Skip to content

Commit cec8b9b

Browse files
committed
Complete time format interpretation
1 parent f56c69c commit cec8b9b

1 file changed

Lines changed: 8 additions & 0 deletions

File tree

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,11 @@ 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+
// a) There are 6 variable declarations.
28+
// b) There is 1 function call. It is on line 10: console.log(result);
29+
// c) The % operator gives the remainder after dividing movieLength by 60.
30+
// c) The % operator gives the remainder after dividing movieLength by 60. 60 represents the number of seconds in one minute.
31+
// d) It subtracts the remaining seconds from the movie length and then divides by 60 to convert the remaining seconds into total minutes.
32+
// e) The variable result represents the movie duration in hours, minutes and seconds. A better name would be movieDuration.
33+
// f) The code works for different positive values of movieLength because it converts seconds into hours, minutes and seconds. It expects movieLength to be a number representing seconds.

0 commit comments

Comments
 (0)