Loading
A function that remembers variables from where it was created, even after that place is gone.
A function bundled with its lexical environment. The inner function retains access to outer-scope variables after the outer function returns. Used for callbacks, factories, and module-style encapsulation.
A first-class function value plus a captured environment of free variables. In JavaScript every function creates a closure; captured variables live on the heap via the function's [[Environment]] internal slot, not the call stack. Closures are how event handlers, setTimeout callbacks, and module patterns retain state.