I’m trying to write something that checks that letters are not equal to vowels. I know I can do this with regular expressions, but for the sake of learning more about conditional statements, how could I write something like this more efficiently?
if (myArray[i] !== "a" || myArray[i] !=="e" || myArray[i] !=="i" || myArray[i] !=="o" || myArray[i] !=="u") {
console.log(myArray[i] + "");
}
By more efficient I mean more DRY without the myArray[i] !== "a"
being repeated so much.