Skip to content

Commit 3d31d1b

Browse files
completed sprint-2/mandatory-interpret
1 parent 21e5060 commit 3d31d1b

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -21,18 +21,19 @@ function formatTimeDisplay(seconds) {
2121
// Questions
2222

2323
// a) When formatTimeDisplay is called how many times will pad be called?
24-
// =============> write your answer here
24+
// pad() is called 3 times.
2525

2626
// Call formatTimeDisplay with an input of 61, now answer the following:
2727

2828
// b) What is the value assigned to num when pad is called for the first time?
29-
// =============> write your answer here
29+
0
3030

3131
// c) What is the return value of pad is called for the first time?
32-
// =============> write your answer here
32+
// =============> 00
3333

3434
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
35-
// =============> write your answer here
35+
// =============> 1
3636

3737
// e) What is the return value of pad when it is called for the last time in this program? Explain your answer
38-
// =============> write your answer here
38+
// =============> The return value of pad when it is called for the last time is "01".
39+
// This is because the value of num is 1, and we are padding it with zeros to make it 2 characters long.

0 commit comments

Comments
 (0)