What if choice 1 is rock? (syntax error) help!


var compare=function(choice1, choice2){
        return"The result is a tie";
        else if (choice1==="rock") {
                return "rock wins";
                return "paper wins";

it keeps saying this; Oops, try again. There was a problem with your syntax.
what's the correct syntax anyone?


You forgot an } to close the function.


Where exactly? Could you please re-write the part were te mistake is coming from?


Well at the very end one for the else, one for the else if and one for the function but in your case I can see only two }.


i still don't get what you are saying?? the very last curly bracket closes the else if and the one before closes the else


Yes so you need another one at the very end of your code to close the function as well. You need 3 you have 2.


oh okay, it went through. Thanks so much!!!!