Help - new to coding and stuck on 6. What if choice1 is rock?

  1. What if choice1 is rock?
    Really need some help - had been doing ok on this until now! I’ve tried reading through the Q&A but can’t figure out what is going wrong.

I receive SyntaxError: Unexpected end of input

var compare = function(choice1, choice2) {
 (choice1 === choice2) { return "The result is a tie!";

else if (choice1 === "rock") {

    if (choice2 === "scissors") {
    return "rock wins";
    else {
        return "paper wins"; 


you need an additional } at the end, to close your function


Thank you! Knew it would be something simple…thanks so much for your help.