I've tried this many times and i cant figure it out no matter what



my error message says my syntax is incorrect this is my first post so it may be a bit off

Replace this line with your code.


var compare = function(choice1, choice2) {
if (choice1 === choice2) {
return "The result is a tie!";
else if (choice1 === "rock") {
if (choice2 === "scissors") add an open { here at the end.
return "rock wins"; }
else {
return "paper wins"; }
add a } here.

give that a whirl and let me know I'm just a step or two ahead of you.