Number guesser game : issues while adding funcitionality

**While adding the functionality of checking users input between 0 to 9, I also want that when the alert box prompts up my program stops comparing the guesses and declaring winners. After pressing okay in an alert message the whole code runs and announces comp as a winner. So I want that there is no declaration when an alert box appears. please give me a hint or modify my code. **
Link of my code is above

Thanks :upside_down_face: :upside_down_face:

1 Like

You can set a boolean variable that triggers when your alert box pops up.
The code that you want to stop can be inside a while loop. The condition for that loop to stop is the alert box popping up. (you might want to give it another escape so that you’re not in an infinite loop).

1 Like

I think I am not in a position to understand what’s happening in that game.js file. I don’t know exactly Which code should I have to stop when the alert box prompts. I tried, but I can’t find out. It’s better to continue with the course and came back here later to amend it. :expressionless: :roll_eyes: