Number Guessing Game

Hi, i’ve just finished making a simple Number Guessing Game, but there are some slight issues i would appreciate some help with.

  1. The first time you play the game (upon loading the browser) the textContent of the highOrLow variable does not display. However, when you press the play again button upon the game ending and play the game again, the high or low variable works fine and continues to work fine until you reload the browser and play for the “first” time again. I assume there is an issue with the if statement?

  2. Kind of the opposite problem, the first time you play the game and lose it, the highOrLow text content does not appear when the game over message displays (which is what i want), then when you restart a new game and lose, the game over message appears alonside the highOrLow message.

I hope i made myself clear, Thank you!

Thank you, that fixed the first issue but for some reason the highOrLow variable is still not getting converted to an empty string when the game is lost. (works fine when the game is won).