Skip to content

Commit b96468b

Browse files
committed
Add detailed explanation for remainder operator in 2-time-format.js
1 parent b9beadc commit b96468b

1 file changed

Lines changed: 5 additions & 1 deletion

File tree

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,4 +35,8 @@ console.log(result);
3535
// - const totalHours
3636
// - const result
3737

38-
// b) There is just 1 function call: console.log(result);
38+
// b) There is just 1 function call: console.log(result);
39+
40+
// c) In the expression 'movieLength % 60', '%' represents the remainder operator. It returns the value that of what is left over after dividing the left operand by the right operand as many whole times as possible.
41+
// Since movieLength = 8784, it means: 8784 % 60, which returns a result of 146 remainder 24.
42+
// Therefore, movieLength % 60 (8784 % 60) returns the leftover value '24'. In this context, the leftover represents the loose seconds that add up to a full minute.

0 commit comments

Comments
 (0)