Reblogged from JavaScript, JavaScript...:
In JavaScript, a closure is a function to which the variables of the surrounding context are bound by reference.
Every JavaScript function forms a closure on creation. In a moment I'll explain why and walk through the process by which closures are created. Then I'll address some common misconceptions and finish with some practical applications. But first a brief word from our sponsors: JavaScript closures are brought to you by…
Understanding Closures in JavaScript is very important. Its one of those silent areas of JavaScript that can make your code "mis-behave" but its very powerful when you understand and take advantage of it.
Of all the materials that I've come across while learning it, this was the easiest to understand.
Enjoy...