File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Sprint-2/4-mandatory-interpret Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -19,16 +19,35 @@ function formatTimeDisplay(seconds) {
1919// a) When formatTimeDisplay is called how many times will pad be called?
2020// =============> write your answer here
2121
22+ // pad is called 3 times.
23+
24+
2225// Call formatTimeDisplay with an input of 61, now answer the following:
2326
2427// b) What is the value assigned to num when pad is called for the first time?
2528// =============> write your answer here
2629
30+ // The value assigned to num the first time is 0.
31+
32+
2733// c) What is the return value of pad is called for the first time?
2834// =============> write your answer here
2935
36+ // The return value is "00" because 0 becomes "0"
37+ // and padStart adds a leading zero.
38+
39+
3040// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3141// =============> write your answer here
3242
43+ // The value assigned to num the last time is 1,
44+ // because remainingSeconds is 1
45+
46+
3347// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
3448// =============> write your answer here
49+
50+ //The return value is "01" because 1 becomes "1"
51+ // when converted to a string, and padStart adds a leading zero.
52+
53+
You can’t perform that action at this time.
0 commit comments