I need help with #6 "SyntaxError: Unexpected end of input"


#1

HI guys! this is the first time I come here to ask for help. I have been trying to figure out what's wrong with my code but I haven't been able to solve it...
I keep getting a "SyntaxError: Unexpected end of input" message.

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

You missed one curly bracket at the end ( } ).
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";
}
}
}