Skip to content

Commit 2f14c92

Browse files
committed
Add explanation for first call to pad
1 parent ac9bd5d commit 2f14c92

1 file changed

Lines changed: 3 additions & 0 deletions

File tree

‎Sprint-3/4-mandatory-interpret/time-format.js‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,9 @@ console.log("The value assigned to num on the first call to pad is:", firstNum);
4545

4646
// b) What is the value assigned to num when pad is called for the first time?
4747
// =============> write your answer here
48+
// for the first call to pad, num is assigned the value of 'totalHours', which is '0'
49+
// Since the template literal is evaluated from left to right, calling 'formatTimeDisplay(61)', the calls occur in this order:
50+
// totalHours, remainingMinutes, and remainingSeconds
4851

4952
// c) What is the return value of pad when it is called for the first time?
5053
// =============> write your answer here

0 commit comments

Comments
 (0)