Possible duplicate:Brackets for automatically executing anonymous JavaScript functions?Are "(function () {}) ()" and "(function () {} ())" functionally equal in JavaScript?
I saw anonymous javascript functions written in two different ways:
(function(){ })();
and
(function(){ }());
I always believed that the top should be correct, and so far he had never met the bottom. I think this probably does not matter, but I thought I would be sure. Is there a difference between two or both equivalents?
They are equivalent.
- - , , , .
. http://kangax.github.com/nfe/ .
Oohh....... .....
, : (Twitter !)
!function(){ }();
. 1 . >
, :
: