6. what if choice1 is rock


hello there, i'm kinda stuck at this, i always get the error message: "unexpected token else"
i'm not quite sure what its about, since i put everything in correctly. at least i think so.
already used the hint, but it kinda looks the same.
so it'd be nice if someone could take a look.

here's the code:

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

return "paper wins";



First, remove the semicolon on youre if condition, on this line:

Second, relocate the other closing curly brace at the end of your code. Simply remove the other closing curly braces on this line:

And add another closing curly brace and a semicolon at the end of your code


oh well, bughunting is totally not my favourite atm, still learning the basics :smiley:
but that did it, thanks alot^^