Stuck at Next Steps. Need some help


#1

So I want to print out the userChoice if users correctly put in "rock", "paper", or "scissors".
If they put in random stuff such as "asdf" and " dogs" that are not R, P ,or S, I want to ask them to redo it until they type in the correct thing.
I wrote the following code, but I don't know what's wrong.
var userChoice = prompt("Do you choose rock, paper or scissors?");
if (userChoice ="rock")
{
console.log ("Player:" + userChoice);
}
else if (userChoice="paper") {
console.log ("Player:" + userChoice)
}
else if (userChoice= "rock"){
console.log("Player" + userChoice)
}
else {userChoice = prompt("Please type rock, paper or scissors for you choice")
}

I need some help on this. Thank you guys!!


#2

Your initiative is admirable. The truth is there is much yet to learn that you will need to know to be able take this project to the next level. Recommend set aside for the time and continue and complete the track. Then you will be able to tackle this any way you want.


#3

Cool! Thanks a lot!!