Two Ways Of Immediate Call To Anonymous Function (function(d){ }() ); And (function(x){ } )();
Possible Duplicate: Are “(function ( ) { } ) ( )” and “(function ( ) { } ( ) )” functionally equal in JavaScript? My question having these special characters, I couldn't
Solution 1:
Your understanding is incorrect.
Those are both function expressions; the placement of the parentheses makes no difference here.
However, there can be a subtle difference.
Solution 2:
They execute exactly the same. The difference is only in syntax.
Post a Comment for "Two Ways Of Immediate Call To Anonymous Function (function(d){ }() ); And (function(x){ } )();"