London | 26-ITP-Jan | Angela McLeary | Sprint 3 | Alarm clock app#1134
Open
AngelaMcLeary wants to merge 9 commits intoCodeYourFuture:mainfrom
Open
London | 26-ITP-Jan | Angela McLeary | Sprint 3 | Alarm clock app#1134AngelaMcLeary wants to merge 9 commits intoCodeYourFuture:mainfrom
AngelaMcLeary wants to merge 9 commits intoCodeYourFuture:mainfrom
Conversation
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
This comment has been minimized.
Luro91
reviewed
Apr 7, 2026
| //what ever we input is turned into seconds | ||
| let totalSeconds = parseInt(timeRemaining.value); | ||
|
|
||
| if (isNaN(totalSeconds) || totalSeconds <= 0) return; |
There was a problem hiding this comment.
Nice input validation. How could you inform the users that the input was invalid?
| let colorInterval; | ||
|
|
||
| function setAlarm() { | ||
| clearInterval(alarmInterval); |
There was a problem hiding this comment.
Nice that you clear the interval here so that the running countdown is stopped
| }); | ||
| }); | ||
| //not sure that this is helping. The function works without it. | ||
| window.setAlarm = setAlarm; |
There was a problem hiding this comment.
You don't need to attach the function to the window object as the function is already declared in the file and available here in this file
| //set the background color transition | ||
| document.body.style.transition = "background-color 0.7s ease"; | ||
| // call the entire page | ||
| window.addEventListener("load", function () { |
There was a problem hiding this comment.
Nice that you did the extension task with changing colors
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
Creating the alarm clock and styling it.