3 ms·
I don't believe this is "the most practical explanation of closures out there" as the author claims, but it does present a use-case. The most important thing to
by padolsey 13y ago
I don't believe this is "the most practical explanation of closures out there" as the author claims, but it does present a use-case. The most important thing to grasp if you're fussed about naming concepts in JavaScript is the difference between a function, a scope [1], a closure [2], and an IIFE [3].
[1] https://developer.mozilla.org/en/docs/Web/JavaScript/Reference/Functions_and_function_scope https://developer.mozilla.org/en/docs/Web/JavaScript/Referen...
[2] http://unscriptable.com/2011/10/02/closures-for-dummies-or-why-iife-closure/ http://unscriptable.com/2011/10/02/closures-for-dummies-or-w...
[3] http://benalman.com/news/2010/11/immediately-invoked-function-expression/ http://benalman.com/news/2010/11/immediately-invoked-functio...
- christian_fei 13y agothank you, I'm really confused about naming concepts in JavaScript because one time you read something, and a minute after on a stackoverflow thread you find it explained and named differently. but I will read through the links you posted, appreciate that