[solved]Lesson 6 SyntaxError: Unexpected number


#1



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

I get SyntaxError: Unexpected number. I'm lost, I don't know what I'm doing wrong, maybe somone could help? Thank you


var compare = function(choice1, choice2) {
    if(choice1 === choice2) {
        return "The result is a tie!";
    }
    else if(choice 1 === "rock") {
        if(choice2 === "scissors") {
            return "rock wins";
        }
        else {
            return "paper wins";
        }
    }
    

};


#2

Never mind, I had a space between choice and 1 inside my else if....
I spent all morning checking brackets :slightly_smiling:


#3

I was just going to type that. Good to hear you resolved the issue