A closure is a programming technique that allows variables outside of the scope of a function to be accessed. Usually, a closure is created when a function is defined in another function, allowing the inner function to access variables in the outer one.
Captured variable, Programming terms
Related information
- How to create a computer program.
- JavaScript closures.
- PHP inner functions and closures.
- Code rant: what is a closure?