7/9 What is the unexpected string


#1
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";
    }
}
else if (choice1 === "paper") {
    if (choice2 ==="rock") {
    return "paper wins";
    }
    else {
    retun "scissors win";
    } 
}    
};

The error message is

SyntaxError: Unexpected string

why?


#2

not sure why it is popping Unexpected string but the problem seems to go away when you fix your last return statement.

Currently it reads:

retun "scissors win";

When it should read:

return "scissors wins";

the simple misspell on your "return" seems to be the real issue. Good luck