Created
November 30, 2011 22:40
-
-
Save ccapndave/1411510 to your computer and use it in GitHub Desktop.
Loop timer
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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