Skip to content

Instantly share code, notes, and snippets.

@bjoerge
Created February 22, 2012 16:39
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjoerge/1885939 to your computer and use it in GitHub Desktop.
Save bjoerge/1885939 to your computer and use it in GitHub Desktop.
This is one of the reasons CoffeeScript simply rocks
after = (ms, func) ->
setTimeout func, ms
after 200, ->
console.log "200 milliseconds passed"
after 400, ->
console.log "400 milliseconds passed"
after 600, ->
console.log "600 milliseconds passed"
@bjoerge
Copy link
Author

bjoerge commented Feb 22, 2012

Try it here: http://goo.gl/Rbr4s

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment