1.

What is a closure JavaScript?

Answer»

It’s a JavaScript feature where an inner function has ACCESS to the enclosing or OUTER function’s variables, which is defined as a scope chain.

There are THREE TYPES of scope chains:
  • Access to its own scope
  • Access to variables of outer functions
  • Access to global variables


Discussion

No Comment Found