Syntax Error on What if choice1 is paper exercise


Hello there, I am stuck on this exercise and can't seem to find the error. This has been a tough exercise and it's confusing me so badly. Thanks for the help. I appreciate it.

Syntax error: Unexpected Token else

if (choice1 === choice2) {
    return "The result is a tie!" }
else if (choice1 === "paper") {
    if (choice2 ==="rock"){
        return "paper wins";
    else { "scissors wins"


A good reason to write closing braces on their own line is to make this error easy to spot. The second closing brace is closing the function body, excluding the rest of the code.


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