Computer choice Part 2


#1

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 >= 0.67) {
computerChoice = "scissors";
}

it says there was a problem with your syntax


#2

In an else statement, you don't need to add a parameter because it's saying that anything else will make this happen. Change it to this:

else {
computerChoice = "scissors";
}

I tried to explain it so I hope that makes sense.

Also it's not that crucial, but you don't need to add {} around the else statement either(although it will still accept the code if you do).