Created
November 6, 2012 13:17
-
-
Save sudodoki/4024693 to your computer and use it in GitHub Desktop.
setting and clearing interval in coffeeScript
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
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
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