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
// % 60 is a remainder operator which in this case divides the total by 60 and shares the remainder (seconds / minutes)
23
23
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
24
-
// The expression assigned to total minutes is the difference of the total movie time in seconds less the remainder of the seconds divided by 60 which gives the total length of the movie in minutes
24
+
// It gives the total number of minutes in the movie, ignoring any leftover seconds.
25
25
// e) What do you think the variable result represents? Can you think of a better name for this variable?
26
26
// The variable result represents the time of the movie in Hours Mintutes and seconds. We could use time instead of result
27
27
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
28
-
// Yes. This code will work for all values of movie length. I tried with 8400 seconds and 8405 seconds
28
+
// Yes. This code will work for all values of movie length. Decimal numbers or string, NAN, undefined or Null could break the code.
0 commit comments