I'm currently in the process of learning to do Javascript, with the help of the ever so useful website www.codecademy.com. I've recently managed to make a simple Rock, Paper, Scissors game, and I've decided to try and improve on it.
The basic idea is that the script prompts for an input, and if it is "Rock", "Paper", or "Scissors", then it randomises a response, and so forth.
I'm currently trying to add a system that makes it so that if the user types anything other than "Rock", "Paper" or "Scissors" in the prompt window, they get an error and get asked to answer again. Is there an if statement or anything similar that will allow me to do this?
Basically
if(userInput isNot "Rock","Paper" or "Scissors"){
prompt again;
} else {
continue;
}
Sorry if I'm incompetent, I'm new to this.
Thanks for your help.