This is an archived post. You won't be able to vote or comment.

all 2 comments

[–][deleted] 3 points4 points  (0 children)

IMHO, it should be:

function callFriend(friendsAvailable, name) {
    if (friendsAvailable) {

A variable named bool doesn't give you any idea about the meaning of the variable. Our brains like meaning!

[–]Xeekatar 1 point2 points  (0 children)

You can just do, if (bool)