Number Guesser -

Link to challenge -

Please help…

What is wrong with my code?

When I log the compareGuesses function, it returns the correct string. However, when I play the game, I always win and my score increases all the time, even if the computer actually wins.

here is my code:

The problem is in your compareGuesses function.

You have actually mentioned where you are going wrong in your description of what it returns. You say it returns a string.

Does that help?

Thank you. I replaced the ‘strings’ for true and false to actual true and false values and it worked!

1 Like

No worries, happy coding!