7 What if Choice1 is paper! HELP!


#1

This is my code:

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

As far as I'm concerned it is correct but it isn't allowing me! :frowning:


#2

This returns without message in case the user had chosen "rock". Have a look at how you did this for "paper":

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

to fix it. You first have a look at what choice1 is and then you handle what is left for choice2.