File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed
Sprint-1/3-mandatory-interpret Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -13,13 +13,25 @@ console.log(result);
1313
1414// a) How many variable declarations are there in this program?
1515
16+ // there is 7 variable declarations.
17+
1618// b) How many function calls are there?
1719
20+ // there is 4 function calls.
21+
1822// c) Using documentation, explain what the expression movieLength % 60 represents
1923// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
2024
25+ // it gives the number of seconds left after counting all full minutes.
26+
2127// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
2228
29+ // is the total number of complete minutes in the movie.
30+
2331// e) What do you think the variable result represents? Can you think of a better name for this variable?
2432
33+ // represents the hours,minutes,seconds of the movie/no
34+
2535// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
36+
37+ // The code won’t work for all values of movieLength. If it’s negative, the result doesn’t make sense because time cannot be negative.
You can’t perform that action at this time.
0 commit comments