Skip to content

Commit 85a99f4

Browse files
remaining part for 2-times
1 parent dcfb916 commit 85a99f4

1 file changed

Lines changed: 5 additions & 3 deletions

File tree

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

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
1-
// const movieLength = 8784;
1+
const movieLength = 8784;
22
// const movieLength = -1;
33
// const movieLength = 8784.5;
44
// const movieLength = 'abc';
5-
const movieLength = 3605;
5+
// const movieLength = 3605;
66
const remainingSeconds = movieLength % 60;
77
const totalMinutes = (movieLength - remainingSeconds) / 60;
88

@@ -39,4 +39,6 @@ console.log(result);
3939
due to the divide the dividend keeps the negatives seconds.
4040
2. Decimals: Move length: 8784.5 gives the answer 2:26:24.5. So, seconds are not a whole numbers in real world.
4141
3. Not a numbers: move length: 'abc'.. When we put the not numbers then they gives the NaN:NaN:NaN(Not a Number) answer.
42-
4. also when we divide the numbers like 3605 its shows the answer */
42+
4. also when we divide the numbers like 3605 its shows the answer 1:0:5 but it needs to shows 1:00:05. Its the problem of formating.
43+
Values that divide by 60 with no remainder (like 120) also work; they just give 0 seconds (0:2:0).
44+
for normal values like 8784 it's shows the correct answer. Its work normally for normal values but shows Nan and formating error for others values. */

0 commit comments

Comments
 (0)