Skip to content

Commit 94987b1

Browse files
Merge branch 'main' into Jest-test-case-sprint-3B
2 parents 8803708 + 9c3d4d8 commit 94987b1

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

Sprint-2/4-mandatory-interpret/time-format.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
function pad(num) {
2-
return num.toString().padStart(2, "0");
2+
let numString = num.toString();
3+
while (numString.length < 2) {
4+
numString = "0" + numString;
5+
}
6+
return numString;
37
}
48

59
function formatTimeDisplay(seconds) {

0 commit comments

Comments
 (0)