6/9 syntax error


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

this is what I have typed in my code. I believe there is nothing wrong with syntax but the system repeatedly says that there is syntax error in my code.
I believe mine is right.. isn't it?


You are missing 1 closing-curly-bracket-} at the end,
with which you close the FUNCTION-BODY

Please read
concentrating on

  • the required return strings
  • the build of the IF ELSE-IF statement structure