Number Guesser - https://www.codecademy.com/practice/projects/number-guesser-independent-practice

Link to challenge - https://www.codecademy.com/practice/projects/number-guesser-independent-practice

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: https://gist.github.com/9488150553d5323137374da74da3c9ad

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!