On Wednesday, February 16, 2011 10:39:36 AM UTC+1, Fran wrote:
>
> That was a good article of Ben Alman... Just wanted to mention that after
> doing some test I found out that using "new function" to immediately invoke
> the function is rather slow compare to the other two patterns, up to 50%
>
That was a good article of Ben Alman... Just wanted to mention that
after doing some test I found out that using "new function" to
immediately invoke the function is rather slow compare to the other two
patterns, up to 50% slower y some cases.
(function () {}());
(function () {})();
new functi
On 16 February 2011 05:16, RobG wrote:
>
> The main reason for using the grouping operator with functions that
> are executed immediately is that it lets humans reading the code know
> that when reading the first line of the function, as explained by
> Peter Michaux:
>
>
That's not *quite* right
On Feb 15, 7:12 pm, Peter van der Zee wrote:
> On Tue, Feb 15, 2011 at 9:53 AM, Ivan S wrote:
> > Hi all.
>
> > I don't know ECMA script specification so well, so if someone can explain
> > what's the difference between this two:
>
> > (function() {
>
> > }());
>
> > (function() {
>
> > })();
>