Skip to content

Commit 5bcd222

Browse files
committed
interpret 2 exercise complete
1 parent d1304cb commit 5bcd222

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

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

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,15 @@ 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-
15+
//6
1616
// b) How many function calls are there?
17-
17+
//1
1818
// c) Using documentation, explain what the expression movieLength % 60 represents
1919
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
20-
20+
//takes the length of movie and gives the remainder after deviding the length by 60
2121
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
22-
22+
// By first subtracting the exact remainder of seconds, the code ensures the remaining number is perfectly divisible by 60
2323
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24-
24+
//gives the length of movie of split into hh:mm:ss, i can maybe give it name "duration"
2525
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26+
//it will not work for values that are negavtives and decimals

0 commit comments

Comments
 (0)