6. What if choice one 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";
}

};
i don't know what to do and i'm getting a SyntaxError: Unexpected end of input


#2

I believe you're missing a closing bracket:

    return "paper wins";
    }
  //Missing closing bracket here!
};

#3

thanks but I all ready figured it out but thanks again for trying to help me.


#4

I had the same problem how do I fix it?