4. Syntax Error Unexpected Token Else


#1

here's my code:

 else if(choice1 === "paper") {
        if(choice2 === "rock") {
            return "paper wins";
        }
  }
        else {
            return "scissors wins";
        }
    }

Every time I press submit, it says there is an unexpected token else, help!


#2

Probably your else if closes to early (before the else) and therefore a following case of else if (after else) causes the problem.