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
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
33
-
/* In this section we can only use the positive natural numbers but if we put numbers that divide by 60 without a remainder get the exact time like 10, 20 50 */
34
-
/*"Percent (%) is a way to describe the full amount of anything by imagining it split into 100 equal sections.*/
35
-
/*we take out the odd seconds before converting to minutes so that when we divide by 60 we can get the exact whole number instead of messy decimal so that*/
36
-
/* i try both decimal both terminal is not showing the error type looks prefect */
37
-
/*[Running] node "c:\Users\Asus\Desktop\code your future\Module-Onboarding\Module-JavaScript-Fundamentals\Sprint-2\Sprint-2\3-mandatory-interpret\2-time-format.js"
38
-
2:26:24
39
-
/* In this case 60% is the remaining second after take out all minutes there has remain second is 24 */
37
+
/* No, it's does not work for all values. It works correctly for any non-negative whole number of seconds.
38
+
1. Negative Number: -1 gives the answer 0:0:-1 which is not the valid time because -1 is not the time formate.
39
+
due to the divide the dividend keeps the negatives seconds.
40
+
2. Decimals: Move length: 8784.5 gives the answer 2:26:24.5. So, seconds are not a whole numbers in real world.
41
+
3. Not a numbers: move length: 'abc'.. When we put the not numbers then they gives the NaN:NaN:NaN(Not a Number) answer.
42
+
4. also when we divide the numbers like 3605 its shows the answer */
0 commit comments