Hacker News new | past | comments | ask | show | jobs | submit login

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) { ... }




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

isUserAMonkey -> Yes/No

userIsAMonkey -> True/False




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: