Please Help


#1


Syntax error...


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 { return "scissors wins"}
}
};


#2

Put semi colons after your return statements

;


#3

Still not working...

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 { return "scissors wins"};
}
};


#4

your function should take in userChoice and computerChoice as arguments instead of choice1 and choice2