Are the instructions correct?


What if choice1 is paper?

1. Inside the compare() function under the existing code, write another else if statement where the condition is choice1 === "paper".
2. Inside this else if statement, write an if / else statement. If choice2 === "rock", return "paper wins". Else, return "scissors wins".

It says choice 2 is the same as rock ... correct?
Then it tells me to write if paper wasn't selected then scissors won but that would be a lose to the scissors, right?


The error code when I submit this returns with:
Oops, try again. Your code returned 'paper wins' instead of 'scissors wins' when the inputs are paper and scissors... So the code will need to be looked into more...


Shut look like this:
else {
return "scissors wins";


I removed my code as this question isn't about my code. It is about the question itself.


This can now be closed as someone has explained it to me.
var compare = function (choice1, choice2) {

if (choice1 === choice2) {

return "The result is a tie!";

else if (choice1 === "paper") {
return "paper wins";

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


You've already eliminated choice1 === choice2 if you read down the entire code so the next obvious choice is chosen.

Boom! Thanks for not helping guys!