We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 889b216 commit 5e6eda5Copy full SHA for 5e6eda5
Sprint-1/3-mandatory-interpret/2-time-format.js
@@ -1,7 +1,7 @@
1
const movieLength = -348769045688; // length of movie in seconds
2
3
-const remainingSeconds = movieLength % 60;
4
-const totalMinutes = (movieLength - remainingSeconds) / 60;
+const remainingSeconds = Math.abs(movieLength) % 60;
+const totalMinutes = (Math.abs(movieLength) - remainingSeconds) / 60;
5
6
const remainingMinutes = totalMinutes % 60;
7
const totalHours = (totalMinutes - remainingMinutes) / 60;
0 commit comments