can someone please help me figure out…what is the mistake in this code?
it appears “oops try again! there was a problem with your syntax.”
please help!
var userChoice = prompt(“Do you choose rock,paper or scissors?”);
var computerChoice = Math.random()
console.log(computerChoice)
if (computerChoice<=0.33) {
computerChoice=“rock”;
}
else if (computerChoice<=0.66) {
computerChoice=“paper”;
}
else (computerChoice<=1) {
computerChoice=“scissors”;
}
I am not sure what I did wrong…
var userChoice = prompt(“Do you choose rock, paper or sissors?”);
var computerChoice = Math.random();
console.log(computerChoice);
if (computerChoice <= 0.33){
computerChoice = “rock”;
};
else if (computerChoice <=0.66){
computerChoice = “paper”;
};
else{
computerChoice = “sissors”;
};