Just for those who don't use Twitter. I've just edited my "ES3.Ch5.Functions" article in respect of explanation the "surrounding parentheses". The thing is, that almost _all_ explanations (in books, articles, etc) were at least very incomplete (and even wrong).

So, why does this code produces a SyntaxError:

function () {
  ...
}()

// or with name

function foo() {
  ...
}();

Try to provide as much complete explanation as possible. Also try to answer without cheating ;) The correct and full explanation is here: http://dmitrysoshnikov.com/ecmascript/chapter-5-functions/#question-about-surrounding-parentheses

Dmitry.

P.S.: Happy New Year!

--
To view archived discussions from the original JSMentors Mailman list: 
http://www.mail-archive.com/[email protected]/

To search via a non-Google archive, visit here: 
http://www.mail-archive.com/[email protected]/

To unsubscribe from this group, send email to
[email protected]

Reply via email to