My syntax is off for compare function


I'm wondering where is my issue with the syntax. The error is unexpected token else.


Hi you closed the compare function before, so you should close it after the else statement after your first if statement remove one } and add one at the end it should be lie that

var compare = function() {
    if (condition) { 

    else if (condition){
        if (condition) { 
        else { 

} <== This one close the compare function


I dealt with the previous syntax error but why is the function saying "paper wins" now?


Hi inside your compare call you should put userChoice and computerChoice like that

compare(userChoice,  computerChoice )


The same outcome occurred. I think there's some problem with my else if statement since that's supposed to give me "rock wins"
but the computer disregards this section and goes straight to the else statement that gives "paper wins."


Hi try to remove the

compare(userChoice,  computerChoice )


fixed it. There was a typo with scissor on line 16.