File tree Expand file tree Collapse file tree 1 file changed +7
-0
lines changed
Sprint-2/4-mandatory-interpret Expand file tree Collapse file tree 1 file changed +7
-0
lines changed Original file line number Diff line number Diff line change @@ -18,17 +18,24 @@ function formatTimeDisplay(seconds) {
18
18
19
19
// a) When formatTimeDisplay is called how many times will pad be called?
20
20
// =============> write your answer here
21
+ // pad will be called 3 times (once for hours, once for minutes, once for seconds).
21
22
22
23
// Call formatTimeDisplay with an input of 61, now answer the following:
23
24
24
25
// b) What is the value assigned to num when pad is called for the first time?
25
26
// =============> write your answer here
27
+ // The first call is pad(totalHours). For input 61, totalHours is 0.
28
+
26
29
27
30
// c) What is the return value of pad is called for the first time?
28
31
// =============> write your answer here
32
+ // pad(0) returns "00".
29
33
30
34
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
31
35
// =============> write your answer here
36
+ // The last call is pad(remainingSeconds). For input 61, remainingSeconds is 1.
37
+
32
38
33
39
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
34
40
// =============> write your answer here
41
+ // pad(1) returns "01".
You can’t perform that action at this time.
0 commit comments