What if choice 1 is a rock


this is what I wrote and the system told me "There was a problem with your syntax"

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

I don't really understand what I did wrong. please help!!!


it also said "unexpected token used" on the side. I don't understand what it means:(


I think you need to make sure that all of if/else if/else statements are closed. I think I see an unopened one with the if statement inside your else if statement. Try looking over it again?