Skip to content

Commit fbade85

Browse files
author
russom
committed
Answer question and explain.
1 parent a613e4c commit fbade85

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

‎Sprint-2/3-mandatory-interpret/2-time-format.js‎

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)