SyntaxError: Unexpected string -- I need help finding & explaining syntax error


#1



https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661#


SyntaxError: Unexpected string


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 "scissors"; }

What have I done wrong?


#2

the purpose of your if/else if/else statement is to give the computerChoice a new value (rock, paper or scissors), you do need a equal sign between the variable name and the string to assign a string to a variable:

computerChoice = "rock"

#3

thank you @stetim94
i spent an hour trying to figure this out