Skip to content

Commit 1247e2f

Browse files
committed
fix the red background and the -ve/0 input.
1 parent bf81515 commit 1247e2f

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎Sprint-3/alarmclock/alarmclock.js‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
let timer;
22
function setAlarm() {
3+
document.body.style.backgroundColor = "white";
34
const input = document.getElementById("alarmSet");
45
let seconds = Number(input.value);
5-
6+
if (seconds <= 0) {
7+
return;
8+
}
69
const timeRemaining = document.getElementById("timeRemaining");
710

811
clearInterval(timer);

0 commit comments

Comments
 (0)