London | 26-ITP-May | Dipa Sarker | Sprint 3 | Alarm Clock App - #1294
Open
Dipa-Sarker wants to merge 1 commit into
Open
London | 26-ITP-May | Dipa Sarker | Sprint 3 | Alarm Clock App#1294Dipa-Sarker wants to merge 1 commit into
Dipa-Sarker wants to merge 1 commit into
Conversation
LonMcGregor
reviewed
Jul 27, 2026
LonMcGregor
left a comment
There was a problem hiding this comment.
Good start on this task, there is still some work to do however
| bodyElement.style.backgroundColor = "yellow"; | ||
| alarmSoundElement.play(); | ||
| } | ||
| function setAlarm() { |
There was a problem hiding this comment.
Have you properly handled the input validation here?
| .padStart(2, "0"); | ||
| const showTimeSeconds = (remainingTime % 60).toString().padStart(2, "0"); | ||
| timeRemainingElement.innerText = showTimeMinutes + ":" + showTimeSeconds; | ||
| if (remainingTime === 0) { |
There was a problem hiding this comment.
Do you properly finish the timer countdown after it hits zero?
|
|
||
| let remainingTime; | ||
| let intervalID; | ||
| function triggerAlarm() { |
There was a problem hiding this comment.
A bit more spacing between functions / improved formatting would help readability.
| window.onload = setup; | ||
|
|
||
| const timeRemainingElement = document.querySelector("#timeRemaining"); | ||
| const alarmSetElement = document.querySelector("#alarmSet"); |
There was a problem hiding this comment.
If you know you are using IDs, can you think of something better tha n querySelector?
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
Implemented the alarm clock functionality with countdown and alarm controls.
** Changes made**
I also tested the functions to works the app properly.