7/9 I'm pretty well stumped


#1

// Help!

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";
    }
else if(choice1 === "paper") {
    if(choice2 === "rock") {
        return "paper wins";
    }
    else {
        return "scissors wins";
    }
}

/* Pretty sure I didn't put any semi-colons where they weren't supposed to go.
This is the first lesson where I just can't figure it out even after referencing the 
Q&A section.  I must now ask a Q and hope for an A.*/

#2

Seems like your missing some }s. One before else if(choice1 === "paper") { to close else if(choice1 === "rock") {.
For the next one you did it correct, but forgot the closing } for the function.


#3

Wow, thanks! That was quick and right on. :smiley: