When referring to a variable's scope, we mean the area of your programme where it is defined. There are only two scopes for JavaScript variables.
During the execution of a function, a local variable takes priority over a global variable with the same name. A global variable is effectively hidden if a local variable or function parameter has the same name as a global variable.
string Knowledge2life