What if choice1 is paper help


#1
function compare(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"
     }else if (choice1 === "paper"){
     if(choice2 === "rock") {
         return "paper wins"
     }else {
         return "scissors wins"
     }
    }
}

What am I doing wrong?


#2

right before this line

add a closing brace }

And remember to add in your semicolons where appropriate


#3

I have a closing one there


#4

like this

function compare(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";
     }
     }//<<==== add this one
     
     else if (choice1 === "paper"){
     if(choice2 === "rock") {
         return "paper wins";
     }else {
         return "scissors wins";
     }
    }
}