You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24
24
25
25
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26
+
27
+
// Answers
28
+
29
+
// a) 6
30
+
31
+
// b) One function call is on this code - console.log() in line 10.
32
+
33
+
// c) The remainder (%) operator returns the remainder left over when one operand is divided by a second
34
+
// operand. It always takes the sign of the dividend.
35
+
36
+
// d) In line 4 the totalHours is calculated by subtracting the remainingMinutes from the totalMinutes and then dividing that answer by 60
37
+
38
+
// e) It is a string representing the time movie time in hours, minutes and seconds
39
+
40
+
// f) yes, because the variables for calculating the results use a formulas that will work with any number that is assigned to the movieLength variable
0 commit comments