@@ -6,8 +6,8 @@ const totalMinutes = (movieLength - remainingSeconds) / 60;
66const remainingMinutes = totalMinutes % 60 ;
77const totalHours = ( totalMinutes - remainingMinutes ) / 60 ;
88
9- const result = `${ totalHours } :${ remainingMinutes } :${ remainingSeconds } ` ;
10- console . log ( result ) ;
9+ const movieDuration = `${ totalHours } :${ remainingMinutes } :${ remainingSeconds } ` ;
10+ console . log ( movieDuration ) ;
1111
1212//A.There are six variable declarations
1313
@@ -19,11 +19,11 @@ console.log(result);
1919// D.it means it is changing the value that was in second into minute by dividing it 60 after the top
2020// calculation makes it whole number.
2121
22- //E. It represents the duration of the movie.movieLength/movieDuration.
22+ //E. It represents the duration of the movie.movieLength/ better name would be movieDuration.
2323
2424//F. No it doesnt work for all different values , I experimented it with -ve numbers and decimals.It doesnt
25- // give the desired output. For example if
25+ // give the desired output. For example if
2626// const movieLength = -60;
27- // result = 0:-1:0, there is no -ve value in time
28- // if const movieLength = 90.5;
29- // result = 0:1:30.5 the out put is decimal second.
27+ // movieDuration = 0:-1:0, there is no -ve value in time
28+ // if const movieLength = 90.5;
29+ // movieDuration = 0:1:30.5 the out put is decimal second.
0 commit comments