Rock, paper, scissors lesson 6


#1

Here is my code:

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

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

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

}
this is not working


#2

You've forgotten an ending curly brace for the function, also please format your code.