6.What if choice1 is rock?


6. What if choice1 is rock?

Hello all. Seem to be stuck on this one. Am I over looking something? what did I miss?

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";


Missing another } after the final }
place any new code before it though otherwise it will be outside the function.


Tried that but it doesn't work.


I literally added that extra } about 5 different times and it would not work. Finally it did work. Maybe something sketchy with the website? Don't know why it wouldn't accept it at first. Thanks for the help.


I don't add anything to the code and it still says It's right...