SyntaxError: Unexpected end of input


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


Hey @tehmayor,

You need another bracket at the end because of:



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


Thanks for the speedy reply!


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

No problem. :smile: