I want to prompt the user for an input and if it isn't a valid option reprompt until a valid input is entered.
Right now it always reprompts not matter the input, correct or not.
Here is the code:
var userChoice = prompt("Do you choose rock, paper, scissors or rope?");
while (userChoice != "rock" || "paper" || "scissors" || "rope") {
userChoice = prompt("Sorry invalid input, please enter either: rock, paper,scissors, or rope.");
}
Seems like it should be a simple thing to do, am I misunderstanding how to use while loops? maybe the operators are wrong? haven't been able to find anything useful, any help is appreciated!