In JavaScript, closures are crucial for functional programming as they facilitate the creation of ________.

  • Private Variables
  • Callbacks
  • Promises
  • Modules
Closures in JavaScript allow the creation of private variables within functions. This encapsulation is essential for functional programming, where data should be isolated and not directly accessible from outside the function.
Add your answer
Loading...

Leave a comment

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