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 @@ -23,3 +23,17 @@ console.log(result);
2323// e) What do you think the variable result represents? Can you think of a better name for this variable?
2424
2525// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26+
27+ // Answers
28+
29+ // a) There are 6 variable declarations.
30+
31+ // b) There are no function calls.
32+
33+ // c) The reminder (%) operator returns the reminder left over when one operand is divided by a second operand.
34+
35+ // d) movieLength(8784) - remainingSeconds(24) = 8760(seconds). 8760 / 60 gives us 146 minutes. totalMInutes = 146
36+
37+ // e) result represents the length of the movie in hours, minutes, and seconds format. It can be renamed movieDuration.
38+
39+ // f) When displaying single digit hour, minute, or seconds it doesn't include 0 in front of the digit.
You can’t perform that action at this time.
0 commit comments