Guest User

Untitled

a guest
Oct 23rd, 2018
99
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. function countdown(n) {
  2. if (n===0) return;
  3. console.log(`${n}!`)
  4. setTimeout(countdown(--n), 1000)
  5. }
  6. // calls countdown n times instantly...
  7. // 1 second later, 10 timeouts expire and do nothing.
Add Comment
Please, Sign In to add comment