Build "Rock, Paper, Scissors"


#1

Hi Guys,
Can someone please help me understand why I’m getting error for this code below

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

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

var computerChoice = Math.random(); {
    console.log(computerChoice);
}
if (computerCoice < 0.34) {
    computerChoice = "Rock";    
}
else if (computerChoice > 0.33 && computerChoice < 0.66) {
    computerChoice = "Paper";
} 
else (computerChoice > 0.66) {
    computerChoice = "Scissors";
}




#2

what error is that exactly?


#3

Hi Boardjumper35411,

I get an error says my code doesn’t look right.

on line 14 I have that small red x next to it and it says “missing “;” before statement”


#4

Check your syntax again. Post your whole code here and then ill take a look


#5

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