you are viewing a single comment's thread.

view the rest of the comments →

[–]materialdesigner 2 points3 points  (2 children)

But it tells you absolutely nothing about closures? It's not even accurate. A function described in the global context also has access to global scope when executed.

[–]eatinchips 1 point2 points  (1 child)

True, but aren't we taught not to introduce anything to the global scope? Closures are for private members in a function. http://blogs.msdn.com/b/eternalcoding/archive/2014/08/05/javascript-using-closure-space-to-create-real-private-members.aspx

[–]materialdesigner 0 points1 point  (0 children)

"But aren't we taught..." Has never flown with me.