Skip to content

Commit d53501a

Browse files
committed
Check if whole number
1 parent 6a98e1c commit d53501a

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
@@ -15,7 +15,7 @@ function setAlarm() {
1515
// validate result
1616
const result = parseInt(timeLeft);
1717
console.log(result);
18-
if (isNaN(result) || result < 0) {
18+
if (isNaN(result) || result < 0 || !Number.isInteger(result)) {
1919
return;
2020
}
2121

0 commit comments

Comments
 (0)