What is Closer
A closure is an inner function that has access to the outer (enclosing) function’s variables—scope chain. The closure has three scope chains:
- it has access to its own scope
- it has access to the outer function’s variables, and
- it has access to the global variables.
The inner function has access not only to the outer function’s variables, but also to the outer function’s parameters.