Q:

Javascript OR variable not working

I’m trying to use OR to allow for multiple case responses for a game I am working on.
The code looks like this:
  if (password1 == ("kimmy gibbler"||"Kimmy Gibbler"||"kimmy Gibbler"||"Kimmy gibbler"))  

{hypeDocument.functions().addPoint(hypeDocument, element, event);

hypeDocument.showSceneNamed('AllCards')console.log("correct!")return;

} else{document.getElementById("password1").childNodes[1].value ="";console.log("no Dice!”);

};

Does anyone have an suggestions as to why only the first response in the list (“kimmy gibbler”) is accepted when a user enters it into the input field?

A:

Two strings OR'd together like this:
"a" || "b"

will always resolve to "a".
What you are looking for is this:
if (password1 == "kimmy gibbler"
 || password1 == "Kimmy Gibbler"
 || password1 == "kimmy Gibbler"
 || password1 == "Kimmy gibbler")

