6. What if choice1 is rock?



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



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


Thanks it worked. Also thanks for the fast reply!