_________ allows a function to access all the variables, as well as other functions, that are in its scope.

  • Closures
  • Callbacks
  • Promises
  • Events
Closures allow a function to access all the variables and other functions that are in its scope when the function was created. This feature enables powerful patterns in JavaScript, like data encapsulation and private variables. Understanding closures is essential for advanced JavaScript development.
Add your answer
Loading...

Leave a comment

Your email address will not be published. Required fields are marked *