Skip to content

Commit a56d71b

Browse files
committed
interpret
1 parent cb7593e commit a56d71b

1 file changed

Lines changed: 7 additions & 7 deletions

File tree

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

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,19 +16,19 @@ function formatTimeDisplay(seconds) {
1616

1717
// Questions
1818

19-
// a) When formatTimeDisplay is called how many times will pad be called?
20-
// =============> write your answer here
19+
// a) When formatTimeDisplay is called how many times will pad be called?
20+
// =============> write your answer here - 3 times
2121

2222
// Call formatTimeDisplay with an input of 61, now answer the following:
2323

24-
// b) What is the value assigned to num when pad is called for the first time?
25-
// =============> write your answer here
24+
// b) What is the value assigned to num when pad is called for the first time? -
25+
// =============> write your answer here - First call is pad(totalHours)
2626

2727
// c) What is the return value of pad is called for the first time?
28-
// =============> write your answer here
28+
// =============> write your answer here - it returs 00
2929

3030
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
31-
// =============> write your answer here
31+
// =============> write your answer here - Last call is pad(remainingSeconds) For 61, remainingSeconds = 61 % 60 = 1, so num is 1.
3232

3333
// e) What is the return value assigned to num when pad is called for the last time in this program? Explain your answer
34-
// =============> write your answer here
34+
// =============> write your answer here - With num = 1, pad(1) returns "01". "1".padStart(2, "0") adds zero to make it 2 characters long.

0 commit comments

Comments
 (0)