Lesson 5 code not working. Plesase help me!


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:


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.


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


@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


we add code

compare ("rock","rock")

will pass lesson!!!


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


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