#6 help


#1

it keeps saying syntax error: unexpected token else and this is my code PLEASE HELP

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

Hi you closed the compare function before

if(choice1===choice2) {
return "The result is a tie!";
}
}; <== you should remove it

and add one at the end of your code

Hint


var compare = function(choice1, choice2 ) {
if (condition) {

}

else if (condition ) {
if ( condition ) {

 }
 else {


  }

}

} <== close compare function