3 ms·
This is how I do setTimeout: delay = (ms, func) -> setTimeout func, ms So you can write it like this: delay 100, -> console.log "100 ms passed"
by ilaksh 13y ago
This is how I do setTimeout:
delay = (ms, func) -> setTimeout func, ms
So you can write it like this:
delay 100, -> console.log "100 ms passed"
- lucisferre 13y agoThe problem is it isn't the only situation this comes up in, and the fact that this has to be done at all is a testament to the problems with adding significant whitespace to a language not completely designed for it.