Possible Duplicate:
What advantages does using (function(window, document, undefined) { … })(window, document) confer?
Advanced Javascript: Why is this function wrapped in parentheses?
I just checked how jquery is written, then in the first line of it i see this:
(function( window, undefined ) {
});
My question is what is the meaning or reason the declaration of function is inside the (
and )
?