Guest User

Untitled

a guest
Jul 21st, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.42 KB | None | 0 0
  1. (function() {
  2.  
  3. doSomething();
  4.  
  5. })()
  6.  
  7. // or ...
  8.  
  9.  
  10. //NOTE: This is basically doing the same thing, but we can gain a tiny bit performance, because we directly
  11. //pass the current window, and document instances to the function, instead of making it iterate
  12. //through the scope
  13.  
  14. (function(window,document,undefined) {
  15.  
  16. doSomething();
  17.  
  18. })(this,document) // these are the arguments being passed to the function at the beginning
Add Comment
Please, Sign In to add comment