File tree Expand file tree Collapse file tree
Sprint-2/3-mandatory-interpret Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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;
66const remainingSeconds = movieLength % 60 ;
77const totalMinutes = ( movieLength - remainingSeconds ) / 60 ;
88
@@ -39,4 +39,6 @@ console.log(result);
3939due to the divide the dividend keeps the negatives seconds.
40402. Decimals: Move length: 8784.5 gives the answer 2:26:24.5. So, seconds are not a whole numbers in real world.
41413. 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. */
You can’t perform that action at this time.
0 commit comments