english word · 2026-07-25
Closure
noun
Meaning
A function that 'remembers' the environment in which it was created, allowing it to access variables from an outer scope even after that outer function has finished executing. It is like a backpack that a function carries around, containing all the variables that were in sight when the function was born.
Etymology
From Middle English 'closure', via Old French from Latin 'clausura', meaning 'a closing' or 'to shut in'.
Examples
"I used a closure to create a private counter variable that can't be modified from outside the function."
"The reason your event listener still has access to the 'id' variable is because of a closure."
A new word every day
Get a beautiful english word in your inbox every morning. Free.
Subscribe →