Advertisement
Guest User

Untitled

a guest
Jan 22nd, 2017
89
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.50 KB | None | 0 0
  1. var hasHeLanded = false;
  2.  
  3. function takeOff() {
  4. setTimeout(function () {
  5. hasHeLanded = true;
  6. console.log("I just landed! Woooho!");
  7. }, 5000);
  8. }
  9.  
  10. function callFriendAndTalkVeryExcitedlyAboutYourPrototype() {
  11. console.log("Hey friend, you will not believe what my mind stumbled upon...");
  12. }
  13.  
  14. var keepCalling = setInterval(function callAirfield() {
  15. if (hasHeLanded) {
  16. callFriendAndTalkVeryExcitedlyAboutYourPrototype();
  17. clearInterval(keepCalling);
  18. }
  19. }, 500);
  20.  
  21. takeOff();
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement