Scope determines the level at which variables can be accessed and modified. Scope is determined by the scope chain, which is the standard for determining the scope of variables.
Local scope refers to the lowest level of the scope chain, and typically refers to block level (ie, inside levels of a function. Global scope refers to the highest level of the scope chain, and can be accessed across not only the current file, but all files across the app.
Why are global variables avoided?