Yelp interview question

Describe what a closure in javascript is.

Interview Answer

Anonymous

Jul 30, 2014

Accessing variables outside of the nearest lexical scope. E.g . if there is a function (x) inside another function (y), the variables can remain accessible after returning from the function (x) called.