ComputerChoice part 2 SyntaxError: Unexpected token &&


#1

ar userChoice = prompt("Do you choose rock,paper,scissors?");
var computerChoice = Math.random(0.2);
console.log(computerChoice = Math.random());
if (0<= computerChoice && computerChoice <=0.33) {
computerChoice = "rock";
} else if (0.34<= computerChoice> && computerChoice <=0.66) {
computerChoice = "paper";
} else {
computerChoice = "scissors";

}

SyntaxError: Unexpected token &&


#2

"} else if (0.34<= computerChoice> && computerChoice <=0.66) {"

After the first computerChoice, take out the ">"

Also, I usually write such things as:

} else if ((computerChoice >= 0.34) && (computerChoice <= 0.66)) {