Scope determines where and how identifiers (variable, function, class) are stored.
See also, same as : Language - Namespace (Scoping rule for name)
A scope can be nested inside another scope. If one scope is nested inside another, code inside the innermost scope can access variables from either scope.
Lexical scope rules say that code in one scope can access variables of either that scope or any scope outside of it.
As the scope is generally dependent of the parse tree, scope are nested.
The scope of a variable is the context in which it's visible to the program.
Many languages use block-level scope, in which variables exist only within this current “block” of code but some other use the function-level as javascript
Scope is basically a collection of variables as well as the rules for how those variables are accessed by name.
A variable name has to be unique within the same scope. But the same variable name a could appear in different scopes.