What am I doing wrong, and what is "unexpected token"?


#1

my code is

var compare = function (choice1,choice2);
if (choice1 === choice2) {
return "The result is a tie!";
};


#2

Remember: a function must also have 2 brackets, like an "if" statement. The problem in your code is that you do not have 2 brackets, one after the function, and one after the "if" statement. You must also take away the semi colon after the function.

Hope it helped! :smiley: