6. What if choice1 is rock?


#1


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


"Oops, try again. Your code returned 'paper wins' instead of 'rock wins' when the inputs are rock and scissors


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

else if(choice1 === "rock") {
    
 if(choice2 === "Scissors") {
    return "rock wins";
}
else {
    return "paper wins";
    }
    
}


};


#2

string comparison is case sensitive, so Scissors equals scissors is false. you might want to compare choice2 with scissors with lowercase first letter


#3

Thanks it worked. Also thanks for the fast reply!


#4