Stuck on Rock Paper Scissors


#1

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

I keep getting a syntax error message. I have read through the different forums, looked over this with my friend who codes, and still cannot figure it out. Any help would be appreciated.


var userChoice = prompt("Do you choose rock, paper or scisors?");
var computerChoice = Math.random() {
    if (computerChoice < 0.34) {
        computerChoice = "rock";
    }  else if (computerChoice <=0.67) {
        computerChoice = "paper";
    } else (computerChoice > 0.67) {
        computerChoice = "rock";
    }
}


#2

An else statement doesn't take a condition.


#3

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.