Speaking of `new`, I prefer former because of its presence:

o = new (function(){
  try { f() } catch(_){ return A }
  return B
}())  // can't be `})()`

Here the intention is not to invoke the wrapper, but to make an
instance off of the return value.


On Jan 16, 5:10 pm, Peter van der Zee <[email protected]> wrote:
> > On Jan 15, 2011, at 5:27 PM, Michael Haufe (TNO) wrote:
>
> > > #1 - function(){ WScript.Echo("foo") }();
> > > #2 - (function(){ WScript.Echo("foo") }());
> > > #3 - (function(){ WScript.Echo("foo") })();
>
> Can I just throw another variation in the mix?
>
> new function(){ WScript.Echo("foo"); };

-- 
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