Plz help meh 7/9


im stuck on if choice 1 = paper

it says SyntaxError: Unexpected token else

 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  (choice2 === "paper")
         return("paper wins")
        else if(choice1 === "paper") {
             if( choice2 === "rock") {
                 return("paper wins") }
             else(choice2 === "scissors"){
                return("scissors wins") }
        compare(userChoice, computerChoice);


In the places I marked with //here, you forgot to add the { symbol after the condition in else. You need to make them like this: else if (condition) {


i did like you said but its still not working


Just go through each else and check if the above statement is an if-statement or not.

You may find it easier to do that if you fix the indentation first, either manually or by running the code through jsbeautifier (google it) or some similar tool