Help with part two syntax error please!


#1


https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/0/4?curriculum_id=506324b3a7dffd00020bf661#
I'm having issues with Build "Rock, Paper, Scissors" part two.


I keep receiving an error that there is something wrong with my syntax. I just can't seem to find the problem. I am sure its something obvious and silly, but a fresh pair of eyes might be needed.


userChoice=prompt("Do you chose rock, paper, or scissors?");
var computerChoice=Math.random();
console.log(computerChoice);
if (computerChoice<=0.33)
    {computerChoice="rock";}
if else (computerChoice <0.67)
    {computerChoice="paper";}
else 
    {computerChoice="scissors";}


#2

Is it "if else" or "else if"?


#3

oh dear, it is 'else if.'
Thanks a bunch


#4

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