Lesson 6 what if choice1 is rock


SyntaxError: Unexpected token else

Does anyone know what is incorrect about the code below?
I have been stuck here for a while please help!!!

The message that I revive is
SyntaxError: Unexpected token else

var compare=function(choice1,choice2){
    if (choice1 === choice2)
    return ("The result is a tie!")
else if (choice1 === "rock") {
    if(choice2 === "sicissors"){
        return "rock wins"
        return "paper wins"



Always read twice what the error has to say! Seems like your syntax is not quite right, check the brackets and stuff :wink:


if (choice1 === choice2) // missing {

see comment in code, that should help you further :slight_smile:


Thank you I was able to find additional errors as well :slight_smile:


i helped you with the error you where stuck at, and would have helped you further (same goes for root4af) but finding the additional errors yourself is much better :slight_smile: