-
-
Notifications
You must be signed in to change notification settings - Fork 193
ZA | ITP-May-2025 | Praise Magidi | Sprint-1 | Module-Structuring-and-Testing-Data #586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
Sprint-1/1-key-exercises/3-paths.js
Outdated
@@ -17,7 +17,9 @@ console.log(`The base part of ${filePath} is ${base}`); | |||
// Create a variable to store the dir part of the filePath variable | |||
// Create a variable to store the ext part of the variable | |||
|
|||
const dir = ; | |||
const ext = ; | |||
const dir = filePath.slice(0, 49); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is a better way to get the needed index.
@@ -7,3 +7,9 @@ const num = Math.floor(Math.random() * (maximum - minimum + 1)) + minimum; | |||
// Try breaking down the expression and using documentation to explain what it means | |||
// It will help to think about the order in which expressions are evaluated | |||
// Try logging the value of num and running the program several times to build an idea of what the program is doing | |||
console.log(num) | |||
|
|||
When breaking down the expression it starts by the third brackets where maximum - minimum + 1, maximum represents a |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please use comments in your answers.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
should i edit the comments in now or this is for future reference?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For future reference.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
thank you
We don't want the computer to run these 2 lines - how can we solve this problem? | ||
We can make the 2 lines comments by adding two slashes before the sentence |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will give an error. How do you stop the pc from running these lines.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please comment out these lines.
@@ -3,3 +3,5 @@ | |||
|
|||
console.log(`I was born in ${cityOfBirth}`); | |||
const cityOfBirth = "Bolton"; | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Fix the error
@@ -12,11 +12,17 @@ console.log(`The percentage change is ${percentageChange}`); | |||
// Read the code and then answer the questions below | |||
|
|||
// a) How many function calls are there in this file? Write down all the lines where a function call is made | |||
line 4 and 5 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more than 2
|
||
// c) Identify all the lines that are variable reassignment statements | ||
line 7 and 8 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Both are wrong.
|
||
// d) Identify all the lines that are variable declarations | ||
line 1 and 2 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There are more
|
||
// e) Describe what the expression Number(carPrice.replaceAll(",","")) is doing - what is the purpose of this expression? | ||
It is removing the commas from the String, making the number easier to read |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It does more than this.
I made the changes that suggested I make yesterday and added the "needs review" label, but I see I did not get the "completed" label now is there more changes I should make. |
Well done |
Learners, PR Template
Self checklist
Changelist
Briefly explain your PR.
Questions
Ask any questions you have for your reviewer.