6/9 error:unexpected end of input


#1

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

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

//this is my code, the error is an unexpected end of input. I think it may have something do do with the semicolons and brackets, but I can't find where the error is


#2

Hi, please put two }} at the last line of your code.


#3

yea, I just figured that out actually by looking at someone else's, and I actually needed to put 3 }}} at the end in order for it to work.. so if i get that error again, i will look at how many stetements there are and see how well closed off with brackets they are
thanks