-
-
Notifications
You must be signed in to change notification settings - Fork 160
NW | 25-ITP-Sep | Ahmad Hmedan | Sprint 1 | feature destructuring #354
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?
NW | 25-ITP-Sep | Ahmad Hmedan | Sprint 1 | feature destructuring #354
Conversation
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Wrong number of parts separated by |s If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
Your PR's title isn't in the expected format. Please check the expected title format, and update yours to match. Reason: Sprint part (Sprint1) doesn't match expected format (example: 'Sprint 2', without quotes) If this PR is not coursework, please add the NotCoursework label (and message on Slack in #cyf-curriculum or it will probably not be noticed). If this PR needs reviewed, please add the 'Needs Review' label to this PR after you have resolved the issues listed above. |
|
|
||
| arr.forEach(({itemName,quantity,unitPricePence})=> { | ||
| itemPrice=unitPricePence*quantity/100; | ||
| const line=String(quantity).padEnd(8)+itemName.padEnd(20)+itemPrice.toFixed(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.
This has quite a lot of duplication with line 11. Imagine if you wanted to change how much padding there was between each column, you'd need to change both lines. Can you work out how to simplify this and avoid this problem?
illicitonion
left a comment
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 is generally looking good! I left one comment. I'd also recommend formatting your code with something like prettier to make it easier to read.
Learners, PR Template
Self checklist
Changelist
All exercises have been solved
Questions
none