Skip to content

Commit e765236

Browse files
changes answer
1 parent 7d41310 commit e765236

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

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

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

33
const remainingSeconds = movieLength % 60;
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
@@ -26,11 +26,11 @@ console.log(result);
2626
// console.log(13 % 5 ); 3
2727

2828
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
29-
// This expression converts movie length from seconds into minutes
29+
// This expression converts movie length from seconds into minutes
3030

3131
// e) What do you think the variable result represents? Can you think of a better name for this variable?
32-
// Variable result represent the movie length formatted as hours, minutes, seconds ,
32+
// Variable result represent the movie length formatted as hours, minutes, seconds ,
3333
// another name could be movieTime
3434

3535
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
36-
// This code works for normal positive number representing but for negative number and very big number it is not working
36+
//So the code works properly for whole numbers, but not for negative numbers and decimal numbers because the result can contain decimal values.

0 commit comments

Comments
 (0)