|
|
|
|
|
by brundolf
1894 days 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 |
|
True. I still think the first is clearer though. Either all tests pass, or they don't.