3 ms·
The traditional alternative also puts your returns at the beginnings of lines. It just uses a lot more lines. if (!err) { return x; } if (con
by baddox 15y ago
The traditional alternative also puts your returns at the beginnings of lines. It just uses a lot more lines.
if (!err) {
return x;
}
if (condition) {
return y;
}
...
- ww520 15y agoNot if you do if (!err) return x; if (condition) return y;