What is a closure in programming?
What is a closure in programming?
Approach: Explain function bundled with its lexical environment.
A function that remembers and accesses variables from its lexical scope even when that function is executed outside its original scope.
Follow-up: In which languages are closures common?
Key concepts: lexical scope, variables.