When writing something like that:
$(document).ready ->
doSomething()
doSomething = ->
alert('Nothing to do')
is compiled into
$(document).ready(function() {
return doSomething();
});
doSomething = function() {
return alert('Nothing to do');
};
In my understand, the return statement is for values (string, array, integer...)
Why coffeescript do that ?