-
-
Notifications
You must be signed in to change notification settings - Fork 179
Karla Grajales | Module-Data-Groups | sprint-3 Alarm clock app #293
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Conversation
cjyuan
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
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
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only have some minor suggestions.
Please feel free to mark this as completed anytime.
| 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); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- 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.
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.