suppose I have declared a global variable test in some file:
var test = {
function1: function(){
testV = "ok";
checkFile();
}
}
How do I access testV in another file?
suppose I have declared a global variable test in some file:
var test = {
function1: function(){
testV = "ok";
checkFile();
}
}
How do I access testV in another file?
That variable is defined in a scope local to that function. You would need to define that variable first in the global scope, and then reference it inside this function and then inside the second function.
For more information, see "What is the scope of variables in JavaScript?"