Skip to content

London | ITP-May-2025 | Sisay Mehari | Module-Data-Flows | Sprint 1- feature/destructuring #226

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

Sisu860
Copy link

@Sisu860 Sisu860 commented Jul 20, 2025

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
✅ Completed Work Summary
This batch includes object destructuring practice, filtering arrays with conditions, and formatting console output for clear receipt printing.

🏠 Array Filtering & Object Destructuring

Implemented a function to filter and print names of Gryffindor students using object destructuring.

Added a function to identify and print teachers who have pets by destructuring object properties and applying multiple conditions.

📄 Formatted Receipt Output

Created a receipt printer that logs each item’s quantity, name, and total price using destructuring.

Used string padding and number formatting to align output neatly in columns.

Calculated and printed the grand total of the order with two decimal precision.

🔍 Best Practices & Code Clarity

Ensured function calls to trigger execution after declaration.

Applied concise and clear variable unpacking for better readability.

Emphasized the importance of formatting for human-friendly console logs.

🧪 Testing & Validation

Manually tested all functions against provided sample data arrays.

Confirmed outputs match expected results exactly, including formatting.

Questions
None at the moment.

…hers-with-pets filter, and formatted takeout receipt using object destructuring
@Sisu860 Sisu860 added Needs Review Participant to add when requesting review 📅 Data Flows This work belongs to Data Flows labels Jul 20, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
📅 Data Flows This work belongs to Data Flows Needs Review Participant to add when requesting review
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant