6 ms·
I do this as well. For a while, I tried to stick to the rule that "return\n" was not allowed. When I meant to return undefined, I'd write "return undefined".
by IsaacSchlueter 16y ago
I do this as well.
For a while, I tried to stick to the rule that "return\n" was not allowed. When I meant to return undefined, I'd write "return undefined".
In the end, I abandoned that rule, because too many of my functions return undefined. But it's kind of a nice thing. When I do get around to building that linter, I might make `return\s*\n` verboten.
- olavk 16y agoYou could just write "return;", that would make it obvious that no value is returned.