What if choice 1 is rock


#1

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" }.......IT WORKED UNTIL HERE......

SECTION 7 BELOW - WHAT IF CHOICE 1 IS ROCK?

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

else {
return "scissors wins"
}
};
Keeps giving me unexpected keyword else syntax error

THAK YOU VERY MUCH!!!


#3

This error message suggests problems with curly braces, either missing or misplaced. Block out the structure, then add the code bits.