Skip to content

Instantly share code, notes, and snippets.

@netzpirat
Created May 4, 2011 19:34
Show Gist options
  • Save netzpirat/955851 to your computer and use it in GitHub Desktop.
Save netzpirat/955851 to your computer and use it in GitHub Desktop.
Return nothing from a CoffeeScript function
-> 'hi'
-> return undefined
(function() {
(function() {
return 'hi';
});
(function() {});
}).call(this);
@alg
Copy link

alg commented May 29, 2011

You can do the same by just saying "return" (without "undefined").

@creamidea
Copy link

Is there a global setting/configure to avoid writing "return"? The programmer can control the "return". I mean that return when we write it??

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment