SyntaxError: Unexpected end of input


#1

Please help me find my error!

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";
}
}


#2

Hey @tehmayor,

You need another bracket at the end because of:

:smile:


#3

Oops I figured it out! I was missing an extra } at the end. Nevermind!


#4

Thanks for the speedy reply!


#5

LOL I'm more speedy than you finding out the problem XD.

No problem. :smile: