Can't figure my mistake out


#1

Please help me out.I can't figure my mistake out.The console keeps saying syntax error.

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


What If Choice1 is Paper
#2

var compare=function(choice1,choice2) {
    if (choice1===choice2) {
    return ("The result is a tie!");
}
else if(choice1==="paper") {
    if(choice2==="rock") {
        return "paper wins";
    /* oops, your if statement should be closed here with a } */
        else {
            return "scissors wins";
        }
    }
}
};