Guest User

Untitled

a guest
Jul 20th, 2018
85
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.24 KB | None | 0 0
  1. var foo = (function f(){
  2. return f;
  3. })(); // do this immediately
  4.  
  5. // then later:
  6. foo();
  7.  
  8.  
  9.  
  10.  
  11. function foo(){}
  12. foo(), setInterval(foo, 1000); // immediately & later on an interval
  13.  
  14.  
  15.  
  16. // LAME
  17. function foo(){}
  18. foo(); // immediately
  19. foo(); // then later
Add Comment
Please, Sign In to add comment