6. what if rock? "unexpected token else"


#1



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


I have written this code exactly how the instructions say, and I even used the hint as a template to help do it. When I hit save, the console says "SyntaxError: Unexpected token else"

Someone examine my code and tell me if it's actually wrong, thank you


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";
    }
    
}


#2

add open { and close } for if statement

if (choice1 === choice2) { //open
return "The result is a tie!"
};close

@werehogify58