Jun 15
•
Articles
• 1 min read
Closures
A function, bundled together with its lexical scope, forms a closure.
A closure provides access to an outer function's scope from an inner function.
function x {
var a = 7;
function y {
console.loga ;
}
y ;
}
x ;
// 7
...