File tree Expand file tree Collapse file tree 1 file changed +6
-7
lines changed
Expand file tree Collapse file tree 1 file changed +6
-7
lines changed Original file line number Diff line number Diff line change @@ -14,21 +14,21 @@ function setAlarm() {
1414 // Read the minutes value from the alarm input field
1515 const minutesInput = document . getElementById ( "alarmSet" ) ;
1616 const seconds = parseInt ( minutesInput . value , 10 ) ;
17- // Ignore invalid or non-positive input
17+ // Ignore invalid or non-positive input
1818
19- if ( isNaN ( seconds ) || seconds <= 0 ) {
20- return ;
21- }
19+ if ( isNaN ( seconds ) || seconds <= 0 ) {
20+ return ;
21+ }
2222 // Reset any existing timer first
2323 resetTimer ( ) ;
24-
24+
2525 // Store the input as the remaining seconds to count down
2626 remainingSeconds = seconds ;
2727
2828 // Update display immediately
2929 updateTimeDisplay ( ) ;
3030
31- // Start countdown
31+ // Start countdown
3232 timerInterval = setInterval ( ( ) => {
3333 remainingSeconds -- ;
3434
@@ -54,7 +54,6 @@ function updateTimeDisplay() {
5454 timeDisplay . textContent = `Time Remaining: ${ formattedMinutes } :${ formattedSeconds } ` ;
5555}
5656
57-
5857// DO NOT EDIT BELOW HERE
5958
6059var audio = new Audio ( "alarmsound.mp3" ) ;
You can’t perform that action at this time.
0 commit comments