What if choice 1 is a rock


#1

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

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{
return "paper wins";
}
}

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


#2

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


#3

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?