Skip to content

Commit 02c0049

Browse files
committed
Clarified comment on the variable name for movie duration to movieDurationString
1 parent 1a7263b commit 02c0049

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@ console.log(result);
2525
// The expression (movieLength - remainingSeconds) / 60 calculates the total number of whole minutes in the movie length. It first subtracts the remaining seconds from the total movie length to get a value that is a multiple of 60, and then divides that value by 60 to convert it from seconds to minutes. It gives it as a whole number and is easier to work with.
2626

2727
// e) What do you think the variable result represents? Can you think of a better name for this variable?
28-
// It represents the movie duration in the format of hours:minutes:seconds. A better name for this variable could be movieDuration.
28+
// It represents the movie duration in the format of hours:minutes:seconds. A better name for this variable could be movieDurationString.
2929

3030
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
3131
// It does not work for negative values. The code assumes that movieLength is a positive integer representing the length of a movie in seconds. If movieLength is negative, the calculations for remainingSeconds, totalMinutes, remainingMinutes, and totalHours will not produce meaningful results, and the final result will not represent a valid time format.

0 commit comments

Comments
 (0)