3 ms·
To extend upon this, you can also pass in references to decrease lookup time. That's why you see people doing: (function($,window) { //code here })(
by tothepixel 12y ago
To extend upon this, you can also pass in references to decrease lookup time. That's why you see people doing:
(function($,window) {
//code here
})(jQuery,window);
- thekingshorses 12y agoThis reduces size after uglifying. (function(window, $, otherGlobal) { $ = window.jQuery; otherGlobal = window.otherGlobal; //code here })(window);