Skip to content

Instantly share code, notes, and snippets.

@ccapndave
Created November 30, 2011 22:40
Show Gist options
  • Save ccapndave/1411510 to your computer and use it in GitHub Desktop.
Save ccapndave/1411510 to your computer and use it in GitHub Desktop.
Loop timer
for n in [0..10]
callback = (n) -> console.log "Hello from #{n}"
setTimeout callback, n * 1000, n
# This works but is it a bit hacky?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment