8/9 Unexpected end of input


#1

Can somebody help me find where I went wrong?

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

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


#2

you have to close your function with } at the bottom


#3

thank you! it worked! but now it says " Make sure to call your compare function with userChoice and computerChoice as the arguments" where do i change that?


#4

Outside of the function body, at the very end, write a function call expression, like so,

compare(userChoice, computerChoice);

Be sure to write the arguments in the above order.

We are not asked to log out any results, but you can if you wish to see them without affecting the lesson.

console.log(compare(userChoice, computerChoice));

#5

Thank you! Thank you!