Skip to content

Instantly share code, notes, and snippets.

@sudodoki
Created November 6, 2012 13:17
Show Gist options
  • Save sudodoki/4024693 to your computer and use it in GitHub Desktop.
Save sudodoki/4024693 to your computer and use it in GitHub Desktop.
setting and clearing interval in coffeeScript
intervalId = setInterval ( ->
console.log 'second passed'
), 1000
clearTimeout intervalId
@tjtimer
Copy link

tjtimer commented Mar 3, 2015

Hey,
shouldn't the bracket be closed after the intervall time, as it is part of "setIntervall" ?

like:
intervalId = setInterval ( ->
console.log 'second passed'
, 1000)
clearTimeout intervalId

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