I am pretty sure I am missing something basic here but I am having trouble with using multiple or
or ||
operators with my if statement.
For some reason the if statement is not catching the name variable:
testword = "billy"
if ((testword != "billy") ||
(testword != "tom") ||
(testword != "sara") ||
(testword != "michael")) {
console.log("none of the names match")
} else {
console.log("name found!")
}
When I try this I get none of the names match
when I should get name found!