I would like to print "Error" message every time a word is not found in a variable from prompt input, it does work with single comparison like for example if (variable!== "word"). But whenever i try to compare multiple words that are defined in the if statement with (variable!= "word1" || variable! != "word2") it returns true even if the word is "word1" or "word2".
var input = prompt ('Enter a string: "word1", "word2" or "word3"?');
if(input!== "word1" || input!=="word2" ||input!== "word3"){
console.log("Error");
}
else{
//do some functions
};