Skip to content

Commit d281f82

Browse files
implemented the function format time
1 parent 59b38f4 commit d281f82

1 file changed

Lines changed: 13 additions & 1 deletion

File tree

‎Sprint-3/alarmclock/alarmclock.js‎

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,16 @@
1-
function setAlarm() {}
1+
let intervalId = null;
2+
let totalSeconds = 0;
3+
4+
function formatTime(seconds){
5+
const minutes = Math.floor(seconds/ 60);
6+
const secs = seconds % 60;
7+
return `${string(minutes).padStart(2,"0")}:${String(secs).padStart(2,"0")}`;
8+
9+
}
10+
function setAlarm() {
11+
12+
13+
}
214

315
// DO NOT EDIT BELOW HERE
416

0 commit comments

Comments
 (0)