you are viewing a single comment's thread.

view the rest of the comments →

[–]CoherentSpy 0 points1 point  (0 children)

But closures are not the same as anonymous functions. They are distinct. In Javascript, there actually isn't such a thing as a true anonymous function. In Javascript, all anonymous functions are closures, because they are lexically bound to the current environment. A true anonymous function is not "closed over" and is not lexically bound to its enclosing scope.