Is there any way to not return something using CoffeeScript?
You have to explicitly return nothing, or to leave an expression evaluating to undefined at the bottom of your function: fun = -> doSomething() return Or: fun = -> doSomething() undefined This is what the doc recommends, when using comprehensions: Be careful that you’re not accidentally returning the results of the comprehension in these cases, … Read more