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 22// let padCallCount = 0;
33// let firstNum;
44// let lastNum;
5+ let lastReturn ;
56
67function pad ( num ) {
78 // padCalls++;
@@ -17,6 +18,7 @@ function pad(num) {
1718 // if (padCallCount === 1){
1819 // firstReturn = numString;
1920 // }
21+ lastReturn = numString ;
2022 return numString ;
2123}
2224
@@ -34,7 +36,7 @@ function formatTimeDisplay(seconds) {
3436// console.log(`formatTimeDisplay(${s})==> ${result}| pad called ${padCalls} times `);
3537// }
3638formatTimeDisplay ( 61 ) ;
37- console . log ( "The value assigned to num when pad is called for the last time is:" , lastNum ) ;
39+ console . log ( "The return value of pad when it is called for the last time is:" , lastReturn ) ;
3840
3941// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
4042// to help you answer these questions
You can’t perform that action at this time.
0 commit comments