Possible Duplicate:
Are “(function ( ) { } ) ( )” and “(function ( ) { } ( ) )” functionally equal in JavaScript?
I'm reading the document below.
http://addyosmani.com/resources/essentialjsdesignpatterns/book/#patternity
When I looked though these examples, self-invoking of an anonymous function had three forms.
The one was
(function() {
//do something
})();
and another was
function() {
//do something
}();
and the other was
(function() {
//do something
}());
What's the difference between these three forms?
Thank you for your reading!