Skip to content

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 1 | Object Destructuring#425

Open
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:feature/destructuring
Open

Sheffield | 26-ITP-Jan | Mahmoud Shaabo | Sprint 1 | Object Destructuring#425
mahmoudshaabo1984 wants to merge 1 commit intoCodeYourFuture:mainfrom
mahmoudshaabo1984:feature/destructuring

Conversation

@mahmoudshaabo1984
Copy link
Copy Markdown

Hello Reviewers / CodeYourFuture Team,

I have completed the Object Destructuring exercises for Sprint 1.

Acceptance Criteria Met:

  • Updated the introduceYourself function parameter in exercise-1 to use object destructuring directly.
  • Used for...of loops and object destructuring in exercise-2 to accurately filter Gryffindor members and teachers with pets.
  • Extracted item properties using object destructuring in exercise-3 to calculate the total cost and formatted the console output correctly.

Thank you for your review!

@mahmoudshaabo1984
Copy link
Copy Markdown
Author

Hi CJ,

I have just submitted my Pull Request for the Sprint 1 Object Destructuring exercises. The acceptance criteria have been met and the code is ready for your review whenever you have time.

Thank you!

@mahmoudshaabo1984 mahmoudshaabo1984 added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 13, 2026
Copy link
Copy Markdown
Contributor

@cjyuan cjyuan left a comment

Choose a reason for hiding this comment

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

Code is good.

Comment on lines +32 to +34
console.log(
String(quantity).padEnd(8) + itemName.padEnd(20) + itemTotal.toFixed(2)
);
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Good idea to use padEnd() to align the item in the first two columns.

How would you modify this code to align the value of itemTotal when its value is 10.00 or more?

@cjyuan cjyuan added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. labels Apr 16, 2026
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.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants