What if choice1 is paper?


#1



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

I keep receiving a "Syntax error"- I have tried to resolve this, though I see no issues. I have also tried changing the curly bracket placing, but this doesn't work either. Can someone let me know what's going on?


var compare = 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 === "rock"){
             return "paper wins";
} else{
    return "scissors wins";
}
}


#2

It is obvious, as the pink suddenly changes. This points to a string error on line 9.

Notice anything wrong?


#3

I've fixed that, it was an error as I had to redo it to try to figure it out. It still doesn't work.


#4

You've capitalized things in the return statements.


#5

This also doesn't work after I fix it. I already had that and had the ability to move on. It states that there is an "Unexpected token else".