Rock #6. what if choice is rock?


#1


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

Oops, try again. There was a problem with your syntax.

be correct.

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


#2

On your if(choice1 === choice 2) there shouldn´t have a space between "choice and 2", the same mistake happens again inside your else if on your other if . You also forgot to close 2 right brackets }}


#3

Thank you for your help. I appreciate it. The devil really is in the details!