Scope (JavaScript)

Scope is the part of a program where a variable is visible and can be used. JavaScript has global scope, function scope, and block scope.