Given that when minified JavaScript variables will be simplified what is the best way to declare or use the variable for window, document, undefined, etc.?
1st way
(function ($, win, doc, undefined) {
}(jQuery, window, document));
2nd way
(function () {
var $ = jQuery,
win = window,
doc = document,
undefined;
}());