Skip to content

Commit 5261da5

Browse files
committed
changed the name of the variable
1 parent ad3fb4c commit 5261da5

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

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

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ const totalHours = (totalMinutes - remainingMinutes) / 60;
88

99
const result = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
1010
console.log(result);
11-
let movieDuration = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
12-
console.log(movieDuration);
11+
let formattedDuration = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
12+
console.log(formattedDuration);
1313
// For the piece of code above, read the code and then answer the following questions
1414

1515

@@ -28,9 +28,9 @@ console.log(movieDuration);
2828
//we are converting the seconds into minutes by dividing by 60
2929

3030
// e) What do you think the variable result represents? Can you think of a better name for this variable?
31-
// we can change the name of the variable result into a clearer variable name like movieDuration
31+
// we can change the name of the variable result into a clearer variable name like formattedDuration
3232
//and if i want to change or update the value later i can use let instead of const
33-
// let movieDuration = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
34-
//the result will be the duration of the movie in hours, minutes, and seconds.
33+
// formattedDuration = `${totalHours}:${remainingMinutes}:${remainingSeconds}`;
34+
//the result will be the duration of the movie in hours, minutes, and seconds(hh:mm:ss) format
3535
// f) Try experimenting with different values of movieLength. Will this code work for all values of movieLength? Explain your answer
3636
//yes it will work for all values of movieLength because the code will always convert seconds into hours, minutes, and seconds format.

0 commit comments

Comments
 (0)