2 ms·
Ideally, every function you write returns a meaningful value ... even if that function is used for nothing more than side effects, and that value is just "true"
by jashkenas 16y ago
Ideally, every function you write returns a meaningful value ... even if that function is used for nothing more than side effects, and that value is just "true", or "null".
To create a void function in CoffeeScript, just add a naked "return" as the final line.
sideEffecty = ->
do something
do somethingElse
return