Skip to content

Commit e9597fb

Browse files
experiment code and explained execution
1 parent 3b6570f commit e9597fb

1 file changed

Lines changed: 8 additions & 1 deletion

File tree

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

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const movieLength = 8784; // length of movie in seconds
2-
2+
// 9237, 8784, -5897...
33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
55

@@ -23,3 +23,10 @@ console.log(result);
2323
// e) What do you think the variable result represents? Can you think of a better name for this variable?
2424

2525
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
26+
27+
// a) there are 6 variable declaration.
28+
// b) there is zero function call . (only one is console.log but it is not part code execution)
29+
// c)represents the number of seconds left over after converting the movie length into whole minutes.
30+
// d) It calculates how many whole minutes are in the movie after taking away extra second that don't make full minutes.
31+
// e) it represents time format like hours : minutes: second and I think MovieLengthDuration or short MovieDuration
32+
// I think all value will work except negative value because negative value gives negative outcome.

0 commit comments

Comments
 (0)