Build "Rock, Paper or Scissors" Question 6 (Help!)


Hello all, I'm stuck on this question :frowning:
Could you please help me find the correct solution to this code, or help me understand what I did wrong?

Error message:
"SyntaxError: Unexpected end of input."

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


Add a bracket } before this bracket };


Phew, thanks! I thought I had done everything wrong =/ (Would be unfortunate, since I worked an hour to get it all fixed up)


Haha you're welcome :grin: Feel free to click the solution button if that was the answer you were looking for