7. What if choice1 is paper?


SyntaxError: Unepected token else???

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


else is an optional part of an if-statement.
Presumably you've written "else" somewhere else (because it's only expected after if, so unexpected would be any other place)


This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.