Lesson 5 code not working. Plesase help me!


#1

Hi everybody.
I have a problem in lesson 5: Both choices are the same!

var compare = function (userChoice, computerChoice) {
if(userChoice === computerChoice) {
return "The result is A tie";
}
};
It is not working. Alert "Your compare function does not return 'The result is a tie!' when there is a tie."

Please help me!!!
Thank u very much! :slight_smile:


#2

Use the exact same text string given in the instructions :slight_smile:

Make the alteration to your return statement, submit it and you should pass to the next exercise.


#3

thank you. I have tried many times but i can't pass the lesson. Please give me your code.


#4

@biff75 is trying to tell you the output is case sensitive change your function to return the exact statement case and all to match and it should work


#5

we add code

compare ("rock","rock")

will pass lesson!!!


#6

This is what the instructions want for your return statement to look like.


#7

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.