I need some concept of threading java script.Actually I struck in one problem .Problem is that I have one function A () calling function B and C.
function A(){
B();
C();
}
function B(){
//doing some task
i=something;
alert(i);
}
function C(){
// i need value I here.
alert(i) //getting undefined
}
I need to synchronised call ...
ias a global variable.B()will be called and completed, before the call toC(). So I'm not sure why you're talking about Threading, when it looks like you're talking about Scope.