No, that's what we use:

(function(){})();

equals

(function(){
// stuff
})();

another cool thing would be:

(function(){
    return arguments.callee;
})()()()();

http://jsfiddle.net/pubkf/

but that's another story :)

On Wed, May 18, 2011 at 5:45 PM, אריה גלזר <[email protected]> wrote:

>
>
> On Wed, May 18, 2011 at 5:18 PM, Philip Thompson 
> <[email protected]>wrote:
>
>> Why not do...
>>
>> (function (){})();
>>
>>
> is this not becoming circular by now?
>
>
>> ~Philip
>>
>>
>> On Wed, May 18, 2011 at 12:20 AM, Ryan Florence <[email protected]>wrote:
>>
>>> > I'm strongly biased towards not doing it at all.
>>>
>>> You have to force the function to be an expression somehow, you can't
>>> just "not do it at all" or else you'll get a parse error.
>>>
>>> function (){}() // error
>>> !function (){}() // IIFE
>>>
>>>
>>
>
>
> --
> Arieh Glazer
> אריה גלזר
> 052-5348-561
> http://www.arieh.co.il
> http://www.link-wd.co.il
>
>

Reply via email to