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.
Loading...
Related Quiz
- What is the significance of the process.nextTick() method in Node.js?
- Which of the following stream types is used for reading data in Node.js?
- ________ is a security practice that involves encoding information so that only authorized parties can access it.
- What happens when an error is thrown inside an async function and it is not caught within the function?
- In Express.js, which middleware is used to handle errors?