3 ms·
More euphonious in a ternary operator than an if clause: value = isUserAMonkey() ? left : right ; if (isUserAMonkey()) { ... } For an if clause, I prefer us
by tlholaday 16y ago
More euphonious in a ternary operator than an if clause:
value = isUserAMonkey() ? left : right ;
if (isUserAMonkey()) { ... }
For an if clause, I prefer userIsAMonkey:
if (userIsAMonkey) { ... }
- ramchip 16y agoIt also sounds better when you consider that the booleans are called True and False: isUserAMonkey -> Yes/No userIsAMonkey -> True/False