By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
459,442 Members | 1,302 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 459,442 IT Pros & Developers. It's quick & easy.

stupid question

P: n/a
alert(function(){return 'foo'}());

responds with "foo".

alert(function(){return
'foo'}());

responds with "undefined".

Why?
Nov 11 '08 #1
Share this Question
Share on Google+
1 Reply


P: n/a
Phil wrote:
alert(function(){return 'foo'}());

responds with "foo".

alert(function(){return
'foo'}());

responds with "undefined".

Why?
Automatic semicolon insertion (ES3F, 7.9); RTFM.

BTW, your From header is borken.
PointedEars
--
var bugRiddenCrashPronePieceOfJunk = (
navigator.userAgent.indexOf('MSIE 5') != -1
&& navigator.userAgent.indexOf('Mac') != -1
) // Plone, register_function.js:16
Nov 11 '08 #2

This discussion thread is closed

Replies have been disabled for this discussion.