The concept of closures and lexical scoping in JavaScript is based on the ________ principle.

  • Scope
  • Encapsulation
  • Abstraction
  • Inheritance
The concept of closures and lexical scoping in JavaScript is based on the "Scope" principle. In JavaScript, scope determines the accessibility of variables and functions in different parts of your code, and closures are a powerful feature that leverages lexical scope to maintain access to variables even after their containing functions have finished executing.
Add your answer
Loading...

Leave a comment

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