Domanda di colloquio di Yelp

Describe what a closure in javascript is.

Risposta di colloquio

Anonimo

30 lug 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.