Basic Syntax

Closure

English

Overview

A mechanism where a function remembers variables from the scope it was defined in.

Details

A mechanism where an inner function retains a reference to variables in its enclosing function's scope, allowing it to access those variables even after the enclosing function has finished executing.

More Programming terms