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 = 3000 ; // length of movie in seconds
1+ const movieLength = 8784 ; // length of movie in seconds
22
33const remainingSeconds = movieLength % 60 ;
44const totalMinutes = ( movieLength - remainingSeconds ) / 60 ;
@@ -9,21 +9,17 @@ const totalHours = (totalMinutes - remainingMinutes) / 60;
99const result = `${ totalHours } :${ remainingMinutes } :${ remainingSeconds } ` ;
1010console . log ( result ) ;
1111
12-
13-
14-
1512//A.There are six variable declararions
1613
1714//B. no function calls
1815
19- // C.The % represents a remainder. The operator returns the remainder leftover when one operand which in
20- // this cas is movieLength is divided by a second operand in this case 60%.
21-
16+ //C.The % represents a remainder. The operator returns the remainder leftover when one operand which in
17+ // this cas is movieLength is divided by a second operand in this case 60%.
2218
2319// D.it means it is changing the value that was in second into minute by dividing it 60 after the top calculation makes it whole number.
2420
2521//E. It represents the duration of the movie.movieLength/movieDuration.
26-
22+
2723// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
28-
29- // yes it works, i experimented it with various values. I found it to be working properly.
24+
25+ // yes it works, i experimented it with various values. I found it to be working properly.
You can’t perform that action at this time.
0 commit comments