Skip to content

Commit 975f1e4

Browse files
answered question e
1 parent 2f73154 commit 975f1e4

1 file changed

Lines changed: 2 additions & 0 deletions

File tree

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,8 @@ console.log(result);
2020
// Answer: this finds the remainder of movieLength when its divided by 60
2121
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
2222
// Answer: The expressions uses the modulo function to work out the remainder value which in this case works out the remaining seconds of the total movie length
23+
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24+
// Answer: The variable `result` represents the movie length converted into hours, minutes and seconds. A better name would be `formattedMovieLength`.
2325
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
2426
// Answer: No it only works as intended when a Non negative integer is used however when Decimal, negative, or string values it does not work as intended.
2527
// Decimal values will display decimal seconds, which does not cause an error, but the output may not be in the expected time format.

0 commit comments

Comments
 (0)