Skip to content

Commit dc16f8d

Browse files
author
russom
committed
Questions a - e answered.
1 parent 9a730bc commit dc16f8d

1 file changed

Lines changed: 14 additions & 0 deletions

File tree

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

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,17 @@ 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+
// answer
28+
29+
// a) 6 variables: movieLength, remainingSeconds, totalMinutes, remainingMinutes, totalHours and result
30+
31+
// b) 1 function calls: console.log(result)
32+
33+
// c) Reminder operator: movieLength (8784 seconds)is divided by 60 and converted into minutes. The reminder value then stored as seconds.
34+
35+
// d) It calculates how many full minutes (60 seconds) in movieLength are there excluding the seconds.
36+
37+
// e) total movie length in hours, minuets and seconds. movieDuration can be an alternative variable.
38+
39+
// f) I tried negative and decimal number. The code works but it doesn't make any sense to represent with this type of values other than integers.

0 commit comments

Comments
 (0)