Skip to content

Commit 00fb750

Browse files
committed
Further comments
1 parent 368cc05 commit 00fb750

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

Sprint-1/3-mandatory-interpret/2-time-format.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const movieLength = 8784; // length of movie in seconds
1+
const movieLength = 3434444; // length of movie in seconds
22

33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
@@ -31,4 +31,6 @@ console.log(result);
3131
// A better name for it could be movieLengthFormatted.
3232

3333
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
34-
// If the seconds are a single digit like "5", the result will look something like 2:26:5. It makes it look unprofessional compared to say 02:26:05.
34+
// If any digit ends up being a single digit like "5", the result will look something like 2:26:5. It makes it look unprofessional compared to say 02:26:05.
35+
// If the movieLength is small like "44", the result will look like 0:0:44, instead of a personally preferable 00:00:44.
36+
// If the movieLength is huge like "3434444", the result will look like 954:0:44, maybe one solution here could be padding 0's to the highest count of digits, but that could cause further problems depending how this result is shown to the user, maybe instead another solution could be just only allow hours to max out at 99.

0 commit comments

Comments
 (0)