What's wrong with my code? Please help :)


Hi guys! Seriously stuck- can't seem to work out what's wrong with my code? I get the message saying that I didn not return the message?

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


Thats cause you didnt call your function.



And you should return the message.


try return ("The result is a tie")


No return doesn't require () around it. The problem is a missing ! at the end of the sentence.


var compare = function(userChoice,computerChoice) {

if (userChoice === computerChoice) {
return "The result is a tie!";