Global Scope

The area outside of all functions is considered to be global scope.
Anything declared in the global scope can be accessed and modified from any scope.


var global1;          // global scope 
function myfinc() {
   var local1; // local scope
}

Local Scope

If a declaration is not in the global scope then it is run in local scope



© 2020 Better Solutions Limited. All Rights Reserved. © 2020 Better Solutions Limited TopPrevNext