Its says something is not right please help


#1

Its says " 'Paper wins' instead of 'rock wins' when the inputs are rock and scissors " but its outputs the right thing i dont now what is wrong

(sorry for my english)

var compare = function(userChoice, computerChoice)
{
    // If user and computer choice is the same
    if (userChoice === computerChoice) {
        return "The result is a tie!";
    }
    // If user choice is rock
    else if (userChoice === "rock") {
        // If computer choice is scissor
        if (computerChoice === "scissor") {       
            return "Rock wins";   
        }
        // If computer choice is paper
        else {
            return "Paper wins";
        }
    }
    // If user choice is scissor
    else if (userChoice === "scissor") {
        // If computer choice is paper
        if (computerChoice === "paper") {
            return "Scissor wins";
        }
        // If computer choice is rock
        else {
            return "Rock wins";
        }
    }
    // If user choice is paper
    else {
        // If computer choice is rock
        if (computerChoice === "rock") {
            return "Paper wins";
        }
        // If computer choice is scissor
        else {
            return "Scissor wins"
        }
    }
}
// Output
console.log(compare("paper","scissor"));

#2

this bit of code:

    else if (userChoice === "scissor") {
        // If computer choice is paper
        if (computerChoice === "paper") {
            return "Scissor wins";
        }
        // If computer choice is rock
        else {
            return "Rock wins";
        }
    }

you use scissor, you should use scissors, both in the comparison and at the return


#3

Thanks alot for the fast response


#4