Hacker News new | ask | show | jobs
by tlholaday 5704 days 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) { ... }

1 comments

It also sounds better when you consider that the booleans are called True and False:

isUserAMonkey -> Yes/No

userIsAMonkey -> True/False