Skip to content

Commit 9d651fb

Browse files
Update time-format.js
Adding the explanations to the answers.
1 parent 79ff965 commit 9d651fb

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,8 @@ function formatTimeDisplay(seconds) {
2828

2929
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3030
// =============> num=1
31+
// Explanation: the third and final call to pad is with remainingSeconds, which equals 1 when the input is 61 seconds.
3132

3233
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
3334
// =============> "01"
35+
// Explanation: the number 1 is converted to a string and padded to 2 digits, resulting in "01".

0 commit comments

Comments
 (0)