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
//const result = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
10
+
//console.log(result);
11
11
12
12
// For the piece of code above, read the code and then answer the following questions
13
13
@@ -50,4 +50,20 @@ console.log(result);
50
50
51
51
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
52
52
53
-
// This code will work for all positive integer values of movieLength. It will correctly calculate the hours, minutes and seconds for any length of movie. However, if movieLength is negative or not an integer, the code may not work as intended. For example, if movieLength is -100, the calculations will not make sense in the context of a movie length. If movieLength is a decimal, it may also cause issues with the calculations.
53
+
// This code will work for all positive integer values of movieLength. It will correctly calculate the hours, minutes and seconds for any length of movie. However, if movieLength is negative or not an integer, the code may not work as intended. For example, if movieLength is -100, the calculations will not make sense in the context of a movie length. If movieLength is a decimal, it may also cause issues with the calculations.
0 commit comments