Hi guys Could someone explain what im doing wrong?


#1

var compare=function (choice1, choice2) {

if(choice1 === choice2) {
return "The result is a tie!";
}

else if (choice1 === "rock") {

if(choice2 === "sissors") {
    return "rock wins";

}
else {
return "paper wins";
}

}



Replace this line with your code.


#2

For the first 'else' statement take off the 'if' and the curly bracket '{'


#3

Thanks for the response, however I am still a little lost!
My code is the same as the hint? well I believe?

if(choice1 === choice2) {
return "The result is a tie";
}

else if(choice1 === "rock") {

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

}