Skip to content

London | 26-ITP-January | Laura C | Sprint 1 | Object Destructuring#400

Open
lauracs24 wants to merge 3 commits intoCodeYourFuture:mainfrom
lauracs24:feature/destructuring
Open

London | 26-ITP-January | Laura C | Sprint 1 | Object Destructuring#400
lauracs24 wants to merge 3 commits intoCodeYourFuture:mainfrom
lauracs24:feature/destructuring

Conversation

@lauracs24
Copy link
Copy Markdown

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

  • Completed exercise 1 using object destructuring in the function parameter
  • Completed exercise 2 using object destructuring to filter Gryffindor students and teachers with pets
  • Completed exercise 3 using object destructuring to print each item in the order and calculate the total

Questions

Is my formatting for exercise 3 acceptable, or should I use methods like padEnd() to better match the expected output?

@lauracs24 lauracs24 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 4, 2026
@lauracs24 lauracs24 moved this to Awaiting Approval🚀 in Coursework Planner Apr 4, 2026
@Luro91 Luro91 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 Apr 10, 2026
let itemTotal = (quantity * unitPricePence) / 100;
total += itemTotal;

console.log(`${quantity} ${itemName} ${itemTotal.toFixed(2)}`);
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

The formatting of the output does not exactly match the requirements

QTY     ITEM                TOTAL
1       Hot cakes           2.32
2       Apple Pie           2.78
1       Egg McMuffin           2.80
1       Sausage McMuffin           3.00
2       Hot Coffee           2.00
4       Hash Brown           1.60

Total: 14.50

@Luro91 Luro91 added Reviewed Volunteer to add when completing a review with trainee action still to take. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Apr 10, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Reviewed Volunteer to add when completing a review with trainee action still to take.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants