Repository navigation
Manchester | 26-ITP-Sep | Mathew Shaibu | Sprint 3 | Alarm clock - #1525
MattCarolus10 wants to merge 25 commits into
Conversation
…the if statement for playing the alarm
…t in setAlarm function
| String(minutes).padStart(2, "0") + | ||
| ":" + | ||
| String(remainingSeconds).padStart(2, "0"); | ||
| timer = setInterval(() => { |
There was a problem hiding this comment.
If Set Alarm is clicked twice before the first countdown ends, what interval does the first callback clear when it reaches zero?
To "like" or "dislike" this comment, please follow this link
| timer = setInterval(() => { | ||
| seconds--; |
There was a problem hiding this comment.
How does a zero or blank duration reach the seconds === 0 check after the first tick?
To "like" or "dislike" this comment, please follow this link
| clearInterval(flashTimer); | ||
| }); | ||
| document.getElementById("pause").addEventListener("click", () => { | ||
| clearInterval(timer); |
There was a problem hiding this comment.
After this clears the countdown interval, what lets the user resume that same countdown?
To "like" or "dislike" this comment, please follow this link
| let timer; | ||
| window.addEventListener("load", () => { | ||
| document.getElementById("stop").addEventListener("click", () => { | ||
| clearInterval(flashTimer); |
There was a problem hiding this comment.
If Stop Alarm is clicked while the page is red, what changes its background back after this interval is cleared?
To "like" or "dislike" this comment, please follow this link
|
The CYF AI review has left comments. It will only review a PR one time. When you have addressed these comments, please request review again and a volunteer will take a look. |
Self checklist
Task code
CYF-1098
Changelist
Added pause button, Stop Alarm clears the flashing interval, pause button stops the countdown, Set Alarm starts fresh countdown