Karla Grajales | Module-Data-Groups | sprint-3 Alarm clock app#293
Closed
Grajales-K wants to merge 19 commits intoCodeYourFuture:mainfrom
Closed
Karla Grajales | Module-Data-Groups | sprint-3 Alarm clock app#293Grajales-K wants to merge 19 commits intoCodeYourFuture:mainfrom
Grajales-K wants to merge 19 commits intoCodeYourFuture:mainfrom
Conversation
cjyuan
reviewed
Jan 18, 2025
Contributor
cjyuan
left a comment
There was a problem hiding this comment.
Code works great. One of the nicest implementations I came across so far.
I only have few minor suggestions.
I think you missed a requirement in readme.md about changing something index.html.
LONDON11| KARLA GRAJALES | SPRINT-3 ALARM CLOCK APP
Ensure the timer displays 00:00 instead of 1 when it reaches zero. This resolves a bug in the countdown logic, and all tests now pass.
cjyuan
reviewed
Jan 18, 2025
Contributor
cjyuan
left a comment
There was a problem hiding this comment.
I only have some minor suggestions.
Please feel free to mark this as completed anytime.
Comment on lines
+47
to
+52
| document.getElementById("timeRemaining").textContent = formatTime(0); // Ensure "00:00" is displayed | ||
| playAlarm(); // Play the alarm sound | ||
| } else { | ||
| // Update the time display on the page with the updated time | ||
| document.getElementById("timeRemaining").textContent = | ||
| formatTime(timeRemaining); |
Contributor
There was a problem hiding this comment.
- Line 47 and line 51-52 are doing exactly the same thing. So they could possibly be factored out from the if-else block.
- For performance reason, we could store the selected element in a variable instead of repeatedly retrieving for the element from
document.
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.
Learners, PR Template
Self checklist
Changelist
This project alarm clock project teaches essential JavaScript skills like DOM manipulation, input validation, and countdown timers. It also covers integrating sound features and controlling a timer. Testing the app with Jest ensures reliable functionality throughout the development process.
Questions
Ask any questions you have for your reviewer.