What is wrong here? It says unexpected token <=


#1

var userChoice = prompt("Do you choose rock, paper, or scissors"); {

}

var computerChoice = Math.random();

if (computerChoice >= 0 && <= .33) {
console.log ("Rock");
}
else if (computerChoice >=.34 && <=.66) {
console.log ("Paper");

}
else {
console.log ("Scissors");

}

console.log (computerChoice)


#2

Two things...

  1. console.log ("Rock"); should be computerChoice = "rock"; Same applies to other two cases.

  2. >= 0 && can be removed, as well >=.34 can be removed.

Model your code after this example...

if (computerChoice <= 0.33) {
    computerChoice = "rock";
} else
if (computerChoice < 0.67) {
    comuterChoice = "paper";
} else {
    computerChoice = "scissors";
}

#3

Thank you very much!