3 ms·
Worth noting that elses don't require curly braces, which are where most of the visual noise is coming from in your example: function check(x) { if (!tes
by brundolf 6y ago
Worth noting that elses don't require curly braces, which are where most of the visual noise is coming from in your example:
function check(x) {
if (!test1 (x)) return false;
else if (!test2 (x)) return false;
else if (!test3 (x)) return false;
else if (!test4 (x)) return false;
else return true;
}
I think this is more clear than either of the above