Why passing undefined to Immediately invoking function (function(window, document, undefined) {...})(window, document); save undefined variable from redeclearation save bit from minification, since the variables will be replaced with shorter alias.