Learning experience with JavaScript is more excited day-by-day.
//
(function(undefined) {
alert(typeof undefined); // boolean
})(true);
//
(function(undefined) {
alert(typeof undefined); // undefined
})();
//
Refer jQuery source code (development version 1.7.1) and modernizr, the first line would be
\\
\\ http://code.jquery.com/jquery-1.7.1.js
(function( window, undefined ) {
})( window );
\\ http://www.modernizr.com/downloads/modernizr.js
window.Modernizr = (function( window, document, undefined ) {
})(this, this.document);
\\
To overcome the issue of undefined, these libraries passing undefined as local variable. Notice the third parameter is left blank.
Read my another post regarding the same topic.