6/9 syntax error


#1

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

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?


#2

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

Please read
http://www.codecademy.com/forum_questions/559dcb4be39efe550f00006b
concentrating on

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