6. What if choice1 is rock?


I've looked over this a thousand times, and even opened up the hint. However, it always say: Oops, try again. There was a problem with your syntax. What am I doing wrong?

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



the opening curly bracket of your function:

var compare = function(choice1, choice2){ // this one

doesn't have a matching closing curly bracket


Wow, thanks. I wasted an hour looking over the entire thing and forgot the thing I mess up on most: The curly brackets.