6.What if choice1 is rock?


#1



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


#2

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


#3

Tried that but it doesn't work.


#4

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.


#5

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