Skip to content

Instantly share code, notes, and snippets.

@balinterdi
Created October 18, 2011 23:02
Show Gist options
  • Save balinterdi/1297011 to your computer and use it in GitHub Desktop.
Save balinterdi/1297011 to your computer and use it in GitHub Desktop.
Event loop (broken)
countdown = 10
h = setInterval ->
countdown--
, 100
do (->) until countdown is 0
clearInterval h
console.log 'Surprise!'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment