What this mean in javascript? -
possible duplicate:
explain javascript's encapsulated anonymous function syntax
i have read javascript book have seen code:
1(function() { // code })();
what ? special function ?
as written, has syntax error.
i'm guessing more like:
(function() { // code })();
or
(function() { // code } )();
break down:
(foo)() // calls foo no arguments.
and
function() { //creates function takes no arguments. // code }
hence create function takes no arguments, , call it. can't see why apart showing can.
Comments
Post a Comment