I can't figure out where my syntax error is


#1

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


#2

Hi @megapro93081!

Im not sure if this is the correct anwser but can you return like random strings without storing into an variable?

Try to store rock wins to like a string as well as paper wins and tell me if it works. Good Luck!


#3

This part seems to be ok probably the error is in the rest of your code.


#4

hi, I agree with haxor, I double checked yours with mine and the code for this part is looking ok.

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

perhaps post your code as is so we can help you identify the syntax error.