NW | 25-ITP-Sep | Ahmad Hmedan | Sprint 1 | feature destructuring#354
NW | 25-ITP-Sep | Ahmad Hmedan | Sprint 1 | feature destructuring#354AhmadHmedann wants to merge 5 commits intoCodeYourFuture:mainfrom
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.
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.
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