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 @@ -19,14 +19,16 @@ console.log(result);
1919
2020// c) Using documentation, explain what the expression movieLength % 60 represents
2121// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
22- // its a rem calculation, basically taking how many groups of 60 are in the movie, the remaining sec is the result .
22+ // its a rem calculation, basically taking how many groups of 60 are in the movie, and giving back the remainder .
2323
2424// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
25- // (movieLength - remainingSeconds): will give us a whole number
25+ // (movieLength - remainingSeconds): gives us a value that's an exact multiple of 60, so it divides evenly.
2626// / 60: takes the whole number and converts it to minutes
2727
2828// e) What do you think the variable result represents? Can you think of a better name for this variable?
29- // the movie length in hours, minutes and seconds
29+ // the movie length in hours, minutes and seconds. formattedDuration
3030
3131// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
32- // edge case: negative movie length. For negative movie lengths it should print an error saying that movielength cannot be less than 0.
32+ // edge cases: negative movie length. For negative movie lengths it should print an error saying that movielength cannot be less than 0.
33+ // : decimal numbers
34+ // : should tell user that the unit is seconds
You can’t perform that action at this time.
0 commit comments