Possible Duplicate:
What does this JavaScript snippet mean?
i was wondering why is the double Bracket in the end of the function?
here is simple of the anonymous function :
(function(){ ... })();
(function(){ … })();
what those for?
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This declares an anonymous function and invokes it immediately on the same line. Think of it as:
where
foorepresents an anonymous function which is declared inline and cannot be referenced by a name.