London | May-2026-itp | Chun Yan Wong | Sprint 3 | Alarm clock - #1369
Open
cywong-dev wants to merge 6 commits into
Open
London | May-2026-itp | Chun Yan Wong | Sprint 3 | Alarm clock#1369cywong-dev wants to merge 6 commits into
cywong-dev wants to merge 6 commits into
Conversation
cjyuan
reviewed
Aug 8, 2026
Initialize timeRemainingElement and assign it to the DOM element.
Declare timeRemainingElement variable at the top for better scope management.
Removed commented-out alarm functions and setup code.
cjyuan
reviewed
Aug 9, 2026
cjyuan
left a comment
Contributor
There was a problem hiding this comment.
Changes look good. Well done.
| function setAlarm() {} | ||
| let countdownInterval = null; | ||
| let flashInterval = null; | ||
| let timeRemainingElement = null; |
Contributor
There was a problem hiding this comment.
I think it is better to declare timeRemainingElement and initialise it as
const timeRemainingElement = document.getElementById("timeRemaining");
- Declaring it as
constis safer.
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
[X] I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
[X] My changes meet the requirements of the task
[X] I have tested my changes
[X] My changes follow the style guide
Changelist
The PR shows the solution for the Sprint3 - AlarmClock