Skip to content

Commit c5f7033

Browse files
committed
Add explanation for return value of last pad call
1 parent 4f756c0 commit c5f7033

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,3 +68,5 @@ console.log("The return value of pad when it is called for the last time is:", l
6868

6969
// e) What is the return value of pad when it is called for the last time in this program? Explain your answer
7070
// =============> write your answer here
71+
// The return value of pad when called for the last time is '01'
72+
// since '1.toString()' is '1', the 'while' loop runs once and adds a '0' to the front, giving '01'

0 commit comments

Comments
 (0)