There was an error while loading. Please reload this page.
1 parent 632df6b commit 589436fCopy full SHA for 589436f
1 file changed
Sprint-2/4-mandatory-interpret/time-format.js
@@ -7,14 +7,14 @@ function pad(num) {
7
}
8
9
function formatTimeDisplay(seconds) {
10
- formatTimeDisplay(61);
11
const remainingSeconds = seconds % 60;
12
const totalMinutes = (seconds - remainingSeconds) / 60;
13
const remainingMinutes = totalMinutes % 60;
14
const totalHours = (totalMinutes - remainingMinutes) / 60;
15
16
return `${pad(totalHours)}:${pad(remainingMinutes)}:${pad(remainingSeconds)}`;
17
+console.log(formatTimeDisplay(61));
18
19
// You will need to play computer with this example - use the Python Visualiser https://pythontutor.com/visualize.html#mode=edit
20
// to help you answer these questions
0 commit comments