What if choice1 is paper


#1

Getting the error syntaxerror expected expression, got keword else

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

#2

No semicolons after conditions:
(choice2 === "scissors");

Also have a look at this chart to see how the case should be constructed:


because your {} closing wrongly as well.