Skip to content

Commit dbc121d

Browse files
finished sprint 3
1 parent 0ada783 commit dbc121d

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,6 @@ function pad(num) {
44
numString = "0" + numString;
55
}
66
return numString;
7-
}
87

98
function formatTimeDisplay(seconds) {
109
const remainingSeconds = seconds % 60;
@@ -22,17 +21,25 @@ function formatTimeDisplay(seconds) {
2221

2322
// a) When formatTimeDisplay is called how many times will pad be called?
2423
// =============> write your answer here
24+
//3
2525

2626
// Call formatTimeDisplay with an input of 61, now answer the following:
2727

2828
// b) What is the value assigned to num when pad is called for the first time?
2929
// =============> write your answer here
30+
//0
3031

3132
// c) What is the return value of pad when it is called for the first time?
3233
// =============> write your answer here
34+
//00
35+
//
3336

3437
// d) What is the value assigned to num when pad is called for the last time in this program? Explain your answer
3538
// =============> write your answer here
39+
//01
40+
//
3641

3742
// e) What is the return value of pad when it is called for the last time in this program? Explain your answer
3843
// =============> write your answer here
44+
//00:01:01
45+
console.log(formatTimeDisplay(61))

0 commit comments

Comments
 (0)