Scope refers to the range from which a specific variable can be accessed. There are two main types of scope - Global Scope and Local Scope. Scope is a question of the accessibility of a variable. Scope is essential
Local scope is beyond the global scope and functions and variables defined within a global scope cannot be accessed from within the global scope. A local scope can access all of its parent scopes' elements but cannot be accessed from those parents.