JavaScript·Beginner·Coding·1 min read
Does every JavaScript function create a closure?
Short interview answer
Every function is created with a reference to its lexical environment, but the closure becomes practically observable when it references outer bindings and survives beyond the immediate execution of that outer scope.
Key takeaway
Explain the underlying mental model clearly, then support it with a concrete example and its trade-offs.