Skip to content

Commit f425e8a

Browse files
committed
This exercise complete
1 parent 770c94a commit f425e8a

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,17 +18,24 @@ function formatTimeDisplay(seconds) {
1818

1919
// a) When formatTimeDisplay is called how many times will pad be called?
2020
// =============> write your answer here
21+
// It will be called 3 times hours,minutes and Seconds.
2122

2223
// Call formatTimeDisplay with an input of 61, now answer the following:
2324

2425
// b) What is the value assigned to num when pad is called for the first time?
2526
// =============> write your answer here
27+
// The first argument passed to pad (totalHours).
28+
// totalHours = 0
2629

2730
// c) What is the return value of pad is called for the first time?
2831
// =============> write your answer here
32+
// pad (totalHours) = pad(0) returns "00".
2933

3034
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3135
// =============> write your answer here
36+
// The value assigned to num when pad called last time is num = 1 because that's the remainingSeconds which is 1 after
37+
// we 61 divided by 60 = 1.
3238

3339
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
3440
// =============> write your answer here
41+
// The return value will be 01 because ToString gives "1" and padStart("2, 0") that adds 0 in the front

0 commit comments

Comments
 (0)