Constructor interview question

(JavaScript) What is a Closure?

Interview Answer

Anonymous

25 Aug 2025

A closure is a function that remembers and has access to variables from its outer (enclosing) scope, even after the outer function has finished executing.