Skip to content

Commit 0fe7ef9

Browse files
committed
Commented-out code and logging related to pad function calls in time-format.js
1 parent a5a7c63 commit 0fe7ef9

1 file changed

Lines changed: 7 additions & 8 deletions

File tree

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

Lines changed: 7 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
1-
let padCalls = 0;
1+
// let padCalls = 0;
22
function pad(num) {
3-
padCalls++;
3+
// padCalls++;
44
let numString = num.toString();
55
while (numString.length < 2) {
66
numString = "0" + numString;
@@ -16,12 +16,11 @@ function formatTimeDisplay(seconds) {
1616

1717
return `${pad(totalHours)}:${pad(remainingMinutes)}:${pad(remainingSeconds)}`;
1818
}
19-
for (const s of [8784, 77, 77777]){
20-
padCalls = 0;
21-
const result = formatTimeDisplay(s);
22-
console.log(`formatTimeDisplay(${s})==> ${result}| pad called ${padCalls} times `);
23-
}
24-
console.log
19+
// for (const s of [8784, 77, 77777]){
20+
// padCalls = 0;
21+
// const result = formatTimeDisplay(s);
22+
// console.log(`formatTimeDisplay(${s})==> ${result}| pad called ${padCalls} times `);
23+
// }
2524

2625
// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
2726
// to help you answer these questions

0 commit comments

Comments
 (0)