News for hackers. Stuff that matters.
Re:JavaScript Quiz Set by minikomi on Saturday January 19, 2013 @07:27PM (#5085426)
From the answers to the first intermediate quiz:

    // These are functions
    // used as closures...

    // This is good
    (function() {
      var foo = 'bar';
    })();
This, to me, seems an odd use of the word closure. Since no value is "closed over" with a function in the internal scope and preserved, it is simply an anonymous function being immediately invoked.

That said, these quizzes are a good way to learn but man does JavaScript have a lot of traps.

There are no comments on this comment yet.