Same Choices -> Unexpected Number Error


#1



https://www.codecademy.com/courses/javascript-beginner-en-Bthev-mskY8/1/1?curriculum_id=506324b3a7dffd00020bf661#


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


#2

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


#3

Thank you very much for catching that!


#4

You're welcome!

(20char)


#5

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