Here is the code:
var compare = function (choice1, choice2) {
if (choice1 === choice2) {
return ("The result is a tie!");
} else if (choice1 = "Rock") {
if (choice2 = "Scissorsr") {
return "rock Wins!";
} else if (choice2 = "Paper") {
return "paper Wins!";
}
} else if (choice1 = "paper") {
if (choice2 = "Rock") {
return "paper wins";
} else if (choice2 = "Scissors") {
return "scissors wins!";
}
}
};
I was learning java script in codecademy and after submitting the code it gets me the error saying
Your compare function doesn't return the correct string when comparing paper to rock.