Rock paper scissors, having some issues help please


Any help getting this issue resolved would be greatly appreciated!

Oops, try again. There was a problem with your syntax.
it also says there is "unexpected token else" wondering what that means.

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"){


Your brackets are a bit off, thus else isn't working the way it should.

There's 2 issues:

here^ after the if statement you closed the else if statement, you need to close it after the else.

the second one:
missing the closing bracket for: var compare = function(choice1, choice2)
add the closing bracket to the end of the code


Thank you got both problems solved!