We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent fbc7a56 commit 548ef16Copy full SHA for 548ef16
1 file changed
Sprint-3/alarmclock/alarmclock.js
@@ -26,11 +26,15 @@ function updateTime() {
26
displayTime();
27
28
if (timeRemainingInSeconds === 0) {
29
+ titleElement.innerText = formatTime(0);
30
playAlarm();
31
document.body.classList.add("flash");
- clearInterval(alarmTimerIdentifier);
32
- alarmTimerIdentifier = null; // Reset to null for proper state management
+ return;
33
}
34
+
35
+ alarmTimerIdentifier = setInterval(() => {
36
+ updateTime();
37
+ }, ONE_SECOND_IN_MILLISECONDS);
38
39
40
/**
0 commit comments