File tree Expand file tree Collapse file tree 1 file changed +5
-5
lines changed
Sprint-2/4-mandatory-interpret Expand file tree Collapse file tree 1 file changed +5
-5
lines changed Original file line number Diff line number Diff line change @@ -17,18 +17,18 @@ function formatTimeDisplay(seconds) {
1717// Questions
1818
1919// a) When formatTimeDisplay is called how many times will pad be called?
20- // =============> write your answer here
20+ Three times , once for the hours , minutes and seconds .
2121
2222// Call formatTimeDisplay with an input of 61, now answer the following:
2323
2424// b) What is the value assigned to num when pad is called for the first time?
25- // =============> write your answer here
25+ The value assighned to num when the pad function called for the first time is 0 , because the total hours is 0.
2626
2727// c) What is the return value of pad is called for the first time?
28- // =============> write your answer here
28+ the return value of pad when it is called for the first time is '00' because the pad function add a '0' to the left of the num to make it 2 characters long . AS the num is 0 the return value is also ' 0' .
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+ the value assighned to num when the pad function is called for the last time is 1 , because the remaining seconds is 1 , as 61 seconds os equal to 1 minute and 1 second .
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+ the return value of pad when it is called for the last time is '01' because the pad function adds a '0' to the left of the num to make it 2 characters long . As the num is 1 , the return value is '01' .
You can’t perform that action at this time.
0 commit comments