Skip to content

Conversation

@MalusiS
Copy link

@MalusiS MalusiS commented Aug 13, 2025

Learners, PR Template

Self checklist

  • I have committed my files one by one, on purpose, and for a reason
  • I have titled my PR with Region | Cohort | FirstName LastName | Sprint | Assignment Title
  • I have tested my changes
  • My changes follow the style guide
  • My changes meet the requirements of this task

Changelist

Refactor exercises to use object destructuring

Exercise 1: Updated introduceYourself to destructure personOne in the function parameter.

Exercise 2:

  • Task 1: Display Gryffindor members’ full names.
  • Task 2: Display teachers with pets.
  • Destructuring used for clean access to object properties.

Exercise 3: Print takeout receipt with item totals and overall total, using destructuring for order items and formatting output to match expected results.

All exercises now leverage object destructuring for concise, readable code.

Questions

Ask any questions you have for your reviewer.

@MalusiS MalusiS added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Aug 13, 2025
@arun-john arun-john 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 Aug 14, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Data Flows) doesn't match expected format (example: 'Sprint 2', without quotes)

1 similar comment
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Data Flows) doesn't match expected format (example: 'Sprint 2', without quotes)

@arun-john
Copy link

Hi Malusi, Good work on this! All the exercises look good, with only some small comments to add.

Exercise 3:

  • Pls. recheck if all the column lengths, padding matches the Expected result exactly
  • Have a think about whether the code will need changing if the quantity per item or the unitPrice changes quite a bit. If at all there are any such scenarios, would it make sense to change the code to factor for those cases too?

Also, as the github bot alert shows, the PR title needs to be corrected :)

@MalusiS MalusiS changed the title ZA | 25-ITP-May | Malusi Skunyana | Data Flows | Destructuring ZA | 25-ITP-May | Malusi Skunyana | Sprint-1 /destructuring Aug 15, 2025
@github-actions
Copy link

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

@MalusiS MalusiS changed the title ZA | 25-ITP-May | Malusi Skunyana | Sprint-1 /destructuring ZA | 25-ITP-May | Malusi Skunyana | Sprint-1/destructuring Aug 15, 2025
@github-actions
Copy link

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

@MalusiS MalusiS changed the title ZA | 25-ITP-May | Malusi Skunyana | Sprint-1/destructuring ZA | 25-ITP-May | Malusi Skunyana | Sprint-1 | Destructuring Aug 15, 2025
@github-actions
Copy link

Your PR's title isn't in the expected format.

Please check the expected title format, and update yours to match.

Reason: Sprint part (Sprint-1) doesn't match expected format (example: 'Sprint 2', without quotes)

@MalusiS MalusiS changed the title ZA | 25-ITP-May | Malusi Skunyana | Sprint-1 | Destructuring ZA | 25-ITP-May | Malusi Skunyana | Sprint-1/destructuring Aug 15, 2025
@github-actions
Copy link

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

@MalusiS MalusiS changed the title ZA | 25-ITP-May | Malusi Skunyana | Sprint-1/destructuring ZA | 25-ITP-May | Malusi Skunyana | Sprint 1 | Destructuring Aug 15, 2025
@MalusiS
Copy link
Author

MalusiS commented Aug 15, 2025

Fixed PR title.

@MalusiS
Copy link
Author

MalusiS commented Aug 15, 2025

Thank you for great feedback! I have updated Exercise 3 to ensure the column widths and padding exactly match the expected result. The implementation now calculates column widths dynamically based on the longest values for quantity, item name, and total, so it remains properly aligned even if quantities, item names, or prices change significantly in the future.

@MalusiS MalusiS added Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 15, 2025
@arun-john arun-john 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 Aug 15, 2025
@arun-john
Copy link

Nice one! Good work 👍

@arun-john arun-john added Complete Volunteer to add when work is complete and all review comments have been addressed. and removed Review in progress This review is currently being reviewed. This label will be replaced by "Reviewed" soon. labels Aug 15, 2025
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.

3 participants