Skip to content

Commit 4d88962

Browse files
committed
Reminder operator practice
dquote>
1 parent e9af9ad commit 4d88962

File tree

1 file changed

+18
-2
lines changed

1 file changed

+18
-2
lines changed

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

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

3-
const remainingSeconds = movieLength % 60;
3+
const remainingSeconds = movieLength % 60; // decalring the remaining seconds
44
const totalMinutes = (movieLength - remainingSeconds) / 60;
55

66
const remainingMinutes = totalMinutes % 60;
@@ -12,14 +12,30 @@ 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+
// 4 on lines : 1, 3 and 6 and 9
16+
1517

1618
// b) How many function calls are there?
19+
//2
20+
// lines 4 and 7
1721

1822
// c) Using documentation, explain what the expression movieLength % 60 represents
1923
// https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Operators/Arithmetic_Operators
24+
// uUses the operator "Reminder". divinfding the month lenth by 60 ( minutes) to get homw many second reminds in the month lengh=
25+
// 8784 / 60 = 146 minutes and remind 24 seconds letf
26+
2027

2128
// d) Interpret line 4, what does the expression assigned to totalMinutes mean?
29+
// line 4 find how many total minutes has in the month lenght.
30+
// first gets te toal seconds less the reminds sconds. it gives the results of total seconds and divides it
31+
//by the 60 ( minutes) = results homw many minutes has in the total lenght
32+
//8784 - 24 ==== 8760
33+
// 8760 / 60 equals 146 minutes
2234

2335
// e) What do you think the variable result represents? Can you think of a better name for this variable?
36+
// represents how long in time is the movie. could be caled= const timeMovie
2437

2538
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
39+
// i guess it wouldnt worrk for negative numbers but actualy evething envolves time is dificult to
40+
//my mind explain. I need to search for more simples expamples to associete this Reminder operetar in time.
41+
// this was a dificult mind flows to me :(

0 commit comments

Comments
 (0)