hello friends my question is i am having two 开发者_如何学编程function f1 and f2 and if i want to execute function f2 after execution of f1 how is it possible?
f1();
f2();
JavaScript is single-threaded, so code is executed linear-ly (is that a word?).
You will have to be a little bit more clear about that
You can have
function f2(){
}
function f1(){
//do something
f2();
}
or
function f2(){
}
function f1(){
}
function f3(){
f1();
f2();
}
精彩评论