Skip to content

Commit 7bc75f1

Browse files
committed
I did the experiment for Question (f),for Question (E) I didn't give a name yet for the variable
1 parent ac4294e commit 7bc75f1

File tree

1 file changed

+12
-0
lines changed

1 file changed

+12
-0
lines changed

Sprint-1/3-mandatory-interpret/2-time-format.js

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff 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.

0 commit comments

Comments
 (0)