english word · 2026-09-23

closure

noun

Meaning

A function that remembers and can access the variables from the environment where it was originally created, even after that environment has finished executing. It is like a traveler carrying a backpack of supplies from home into a new territory.

Etymology

Derived from the Middle English 'closen', from Old French 'clore', meaning to shut or enclose.

Examples

"I used a closure to create a private counter that can't be modified from the global scope."

"The inner function has a closure over the 'userId' variable, so it still knows who the user is when the callback finally triggers."

A new word every day

Get a beautiful english word in your inbox every morning. Free.

Subscribe →