Skip to content

Commit 07a6401

Browse files
author
JorvanW
committed
change a line to code to specify that seconds has to be a whole number
1 parent 2a57b48 commit 07a6401

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
@@ -6,7 +6,7 @@ function setAlarm() {
66
const alarmSetInput = document.getElementById("alarmSet");
77
seconds = Number(alarmSetInput.value);
88

9-
if (seconds <= 0 || isNaN(seconds)) {
9+
if (seconds <= 0 || !Number.isInteger(seconds)) {
1010
alert("Please enter a valid number.");
1111
return;
1212
}

0 commit comments

Comments
 (0)