Skip to content

Commit 179fcb4

Browse files
committed
Add explanation for totalMinutes calculation, result meaning and suggest better variable name for result in 2-time-format.js
1 parent d6a7f93 commit 179fcb4

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

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

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,4 +44,7 @@ console.log(result);
4444
// d) The expression assigned to totalMinutes simply means, we subtract the loose seconds, '24', from movieLength, '8784'. The result becomes a number easily divisible by 60
4545
// That is: totalMinutes = (8784 - 24);
4646
// which gives 8760, and then divides it 60;
47-
// the result, 146, is the total number of complete minutes contained in the movie
47+
// the result, 146, is the total number of complete minutes contained in the movie
48+
49+
// e) The variable 'result' is a template literal syntax which holds the movie's length formatted as a colon-separated time string: as in '2:26:24'.
50+
// A better name for 'result' could have been 'movieLengthDisplay'

0 commit comments

Comments
 (0)