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 088c50a commit 3b35e29Copy full SHA for 3b35e29
Sprint-3/alarmclock/alarmclock.js
@@ -6,6 +6,12 @@ function updateDisplay(heading, time) {
6
7
function setAlarm() {
8
let time = Number(document.getElementById("alarmSet").value);
9
+
10
+ if (!time || time <= 0) {
11
+ alert("Please enter a valid time in seconds.");
12
+ return;
13
+ }
14
15
const heading = document.getElementById("timeRemaining");
16
17
audio.loop = true;
0 commit comments