In JavaScript, a function that is defined inside another function has access to the outer function's variables, forming a ________.

  • Closure
  • Enclosure
  • Junction
  • Intersection
In JavaScript, when a function is defined inside another function, it forms a "closure." A closure allows the inner function to access the outer function's variables even after the outer function has finished executing.
Add your answer
Loading...

Leave a comment

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