Same Choices -> Unexpected Number Error


I believe that my code is correct, but I am getting "SyntaxError: Unexpected number." However, I do not think that I included any numbers in the code.

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

compare("paper", "paper");


There is a space between the "choice" and the "2" in your parameter "choice2".


Thank you very much for catching that!


You're welcome!



This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.