Skip to content

Commit e678b92

Browse files
update solution 2-time-format.js
1 parent 4bc0b4b commit e678b92

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

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

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const movieLength = 8784; // length of movie in seconds
1+
const movieLength = 86401; // length of movie in seconds
22

33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
@@ -21,5 +21,6 @@ console.log(result);
2121
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
2222
//------->ans: (movieLength - remainingSeconds) / 60;
2323
// e) What do you think the variable result represents? Can you think of a better name for this variable?
24-
//
24+
//------->ans: it generates a number in "seconds", for selection of name? the selected one is fine. as long as it follows the variable names convention and the reader or debugger easily understand it.
2525
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26+
//------->ans: it has a constrain or maybe limitation, that is if value movie length is bigger that 86400 the time shown not appropriate, it should give a hint that it more than a day

0 commit comments

Comments
 (0)