File tree Expand file tree Collapse file tree 1 file changed +6
-0
lines changed
Sprint-1/3-mandatory-interpret Expand file tree Collapse file tree 1 file changed +6
-0
lines changed Original file line number Diff line number Diff line change @@ -12,14 +12,20 @@ console.log(result);
1212// For the piece of code above, read the code and then answer the following questions
1313
1414// a) How many variable declarations are there in this program?
15+ // there are 6 declarations lines 1-3-4-6-7 and 9.
1516
1617// b) How many function calls are there?
18+ // 1 function call.
1719
1820// c) Using documentation, explain what the expression movieLength % 60 represents
1921// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
22+ // it gives the number of seconds left after counting all full minutes.
2023
2124// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
25+ // the total number of complete minutes in the movie.
2226
2327// e) What do you think the variable result represents? Can you think of a better name for this variable?
28+ // represents the hours,minutes,seconds of the movie.better name for the variable can be (movieTime).
2429
2530// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
31+ // 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