File tree Expand file tree Collapse file tree
Sprint-3/4-mandatory-interpret Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -4,7 +4,6 @@ function pad(num) {
44 numString = "0" + numString ;
55 }
66 return numString ;
7- }
87
98function 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 ) )
You can’t perform that action at this time.
0 commit comments