London | 26-ITP-Jan | Kris Oldrini | Sprint 3 | Alarm Clock App#1208
Open
XiaoQuark wants to merge 7 commits intoCodeYourFuture:mainfrom
Open
London | 26-ITP-Jan | Kris Oldrini | Sprint 3 | Alarm Clock App#1208XiaoQuark wants to merge 7 commits intoCodeYourFuture:mainfrom
XiaoQuark wants to merge 7 commits intoCodeYourFuture:mainfrom
Conversation
…ent based on user input
…ge the time in the UI
…y storing interval ID in state
A-O-Emmanuel
left a comment
There was a problem hiding this comment.
This is a good attempt, but i noticed the following things:
- When I click the
set alarmbutton the timer starts counting backwards. - The inpput field accepts negative numbers.
…er from going below 0
Author
|
Thank you for the feedback. I implemented input validation so so the timer only accepts positive integers, and cannot count below |
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
HTML
titleto "Alarm clock app"Script
setAlarm()function to display the inputted time in the UIformatTime()to convert seconds intoMM:SSformatstate, for easier access across functionstimer()function, usingsetInterval(), that decreases the time every 1000 millisecondplayAlarm()when the countdown reaches00:0000:00when the alarm triggersTest
Extra Tasks