16 bugs found and fixed#251
Open
nishakrips wants to merge 1 commit intoCode-the-Dream-School:mainfrom
Open
Conversation
gacurl
approved these changes
Mar 10, 2026
gacurl
left a comment
There was a problem hiding this comment.
Overall Feedback
Game logic works and core debugging tasks appear implemented. The guessing flow, attempt tracking, and reset behavior are mostly correct. One rubric gap: the max guesses message is never displayed, even though the element exists in the HTML.
Summary
The debugging assignment largely works and the game flow behaves correctly. Final improvement is to display the max guesses message when attempts run out and correct the guess count displayed after a win.
There was a problem hiding this comment.
index.css
Works
- Simple layout using flexbox
- Input and reset button styled appropriately
Improve
- CSS is minimal but sufficient for the assignment.
There was a problem hiding this comment.
index.html
Works
- Correct input field and buttons
- Message elements present for game feedback
- Reset button exists and is hidden at start
Improve
- HTML comment before the script tag is malformed:
<!-should be<!-- max-guessesmessage exists but is never triggered by the JS.
There was a problem hiding this comment.
index.js
Works
- Random number generation implemented
- Attempts tracked correctly
- Messages hidden and displayed properly
- Input validation for <1 and >99 implemented
- Submit and reset event listeners working
- Game state resets correctly with
setup()
Improve
max-guessesmessage is never shown when attempts reach 5.- Correct guess message reports number of guesses incorrectly:
it displaysmaxNumberOfAttempts - attemptsinstead of the actual guesses made.
Suggested fix
- When
attempts === maxNumberOfAttemptsand guess is incorrect, displaymaxGuessesMessage.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Here are the list of bugs found and fixed :-