Getting lost in 8. What if choice1 is scissors?


#1


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


I think I've messed up my code somewhere, but I really can't see it for looking due to the time I've spent staring at it confused!
Thanks in advance for your help! I find myself getting very confused with the statements being inside each other in JS - though in other languages it doesn't hurt my brain so much! D:'
The error message I receive is "Oops, try again. There was a problem with your syntax."


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

 var compareMe = function(choice1, choice2) 
 {
    if(choice1===choice2)
    {
     return"The result is a tie!";   
    }
     else if (choice1==="rock")
    {
     if(choice2==="scissors")
    {
     return "rock wins";
    }
     else
    {
     return"paper wins";
    }
    
    }
    else if (choice1==="paper")
    {
     if(choice2==="scissors")
    {
     return "scissors wins";
    }
    else
    { 
        return "paper wins";
    }
    else if(choice1==="scissors")
    {
        if(choice2==="paper")
        {
            return "scissors wins";
        }
        else 
        {
            return "rock wins";
        }
    }
}

    
compareMe(userChoice, computerChoice);


#2

HI thid part its missing the closing } of the else if statement

else if (choice1==="paper")
    {
     if(choice2==="scissors")
    {
     return "scissors wins";
    }
    else
    { 
        return "paper wins";
    }
} <== add one here

#3

Thank youuuu!!!!
:heart::heart::heart::heart::heart::heart::heart: