Skip to content

Commit 005369b

Browse files
Making minor change so that the function can work with decimal number.
1 parent 832f671 commit 005369b

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

Sprint-3/alarmclock/alarmclock.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ function setAlarm() {
1111
const input = document.getElementById("alarmSet");
1212
let time = Number(input.value);
1313

14-
if (isNaN(time) || time < 0) {
14+
if (isNaN(time) || time < 0 || !Number.isInteger(time)) {
1515
updateHeading(0);
1616
return;
1717
}

0 commit comments

Comments
 (0)