Step 6: unexpected end of script


#1

this is literally exactly what it says to do in the instructions, yet no matter how many times i try, i can't seem to get past this annoying "unexpected end of script" any help would be dearly appreciated

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

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

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

}


#2

You need a } at the bottom.
If you have the flashing bar touching the right side of a bracket it will put a box around the bracket it is connected to.


#3

okay, now i feel stupid for not catching that sooner...facepalm