Skip to content

Conversation

Fares-Bakhet
Copy link

Learners, PR Template

Self checklist

  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • My changes meet the requirements of the task
  • I have tested my changes
  • My changes follow the style guide

Changelist

I have made all the changes required and run the tests needed.

Questions

No questions.

@Fares-Bakhet Fares-Bakhet added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Structuring-And-Testing-Data The name of the module. labels Sep 30, 2025
@tenzyns tenzyns added Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Oct 1, 2025
declaring a new variable priceAfterOneYear:
let priceAfterOneYear = "8,543";
*/
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

priceDifference and percentageChange are also variables. Although their values are fixed after assignment due to the use of the const keyword, they are still considered variables in JavaScript.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzyns, I missed these two🤔😥 I will add them now.
Thanks a lot.

// d) Interpret line 4, what does the expression assigned to totalMinutes mean?

/*
The expression gives the completed total minutes of the movie, by subtract the movie length in sec from the remaining seconds and divide the result by 60 to convert it to minutes
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You're correct. Just to slightly rearrange the wording, you could say 'subtract the remainingSeconds from the movieLength...'

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzyns ,
Okay, I'll fix it right now 👍👍

/*
The variable result shows(display) the total length of the movie in three sections (Hours:Minutes:seconds) in string format.
I can think of "MovieDuration" as a better name because it gives more description to the output.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's a convention to start a variable name with lowercase, though not a rule.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzyns, I just heard this info on a video a couple of hours ago😁😁 it's like writing code.

Answer:
-console is a built-in object.
-log and assert are properties of that object, specifically functions (methods).
-The console.assert() static method writes an error message to the console if the assertion is false. If the assertion is true, nothing happens.
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

for console.assert(condition, message); you provide a boolean expression as the 1st argument and message string if false.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@tenzyns ,
Do I need to rephrase my expression, for example, [if the condition is false, it prints an error message in the console. If the condition is true, it doesn’t output anything. Should I avoid using Boolean words (true, false)?

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@Fares-Bakhet, Apologies, didn't get notified of this. No you don't need to rephrase. Just to be aware of the what arguments it accepts.

@tenzyns tenzyns added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Oct 1, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Complete Volunteer to add when work is complete and all review comments have been addressed. Module-Structuring-And-Testing-Data The name of the module. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants