What is Scope?

Scope means access to a variable within a program. We have different scopes since we have functions in a program.

JavaScript also has a different scope for its variables such as,