Skip to content

Manchester | 26-ITP-Jan | Ofonime Edak | Sprint 1 | Feature/Destructuring#407

Closed
Ofonimeedak wants to merge 11 commits intoCodeYourFuture:mainfrom
Ofonimeedak:feature/destructuring
Closed

Manchester | 26-ITP-Jan | Ofonime Edak | Sprint 1 | Feature/Destructuring#407
Ofonimeedak wants to merge 11 commits intoCodeYourFuture:mainfrom
Ofonimeedak:feature/destructuring

Conversation

@Ofonimeedak
Copy link
Copy Markdown

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

Update and destructuring argument for a function
Write a function for the teacher's pet
print receipt function

@Ofonimeedak Ofonimeedak added 📅 Sprint 1 Assigned during Sprint 1 of this module Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. Module-Data-Flows The name of the module. labels Apr 5, 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
}

introduceYourself(personOne);
console.log(introduceYourself(personOne));
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

What does this log?

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

I don't see any console output here

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

It logs this message to the console: Hello, my name is Popeye. I am 34 years old and my favourite food is Spinach.

When I run this on my terminal: Module-Data-Flows\sprint-1\destructuring\exercise-1> node exercise.js

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My comment refers to exercise 2

return totalCost;
}, 0);
const finalBill = grandTotal.toFixed(2);
console.log(`Total:${finalBill}`);
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 console output does not match the requirements

@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
@Ofonimeedak Ofonimeedak requested a review from Luro91 April 11, 2026 18:22
Copy link
Copy Markdown

@Luro91 Luro91 left a comment

Choose a reason for hiding this comment

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

Please apply the correct label next time when you need another review as I am using them to see where I need to rereview

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

My comment refers to exercise 2


function orderReceipt(orderItems) {
const totalList = [];
console.log("QUANTITY ITEM TOTAL");
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 text should say "QTY"

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you, I have worked on this. Please kindly review

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

This is still the same

@Ofonimeedak Ofonimeedak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 15, 2026
@Ofonimeedak Ofonimeedak requested a review from Luro91 April 15, 2026 10:42
const { firstName, lastName, house } = mate;
if (house === "Gryffindor") {
const gryffindorMates = `${firstName} ${lastName} lives in `;
console.log(gryffindorMates);
Copy link
Copy Markdown

@Luro91 Luro91 Apr 16, 2026

Choose a reason for hiding this comment

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

The output does not match the requirements:
I like the idea of making the logs more specific. However where do the people live in?

Harry Potter lives in 
Ron Weasley lives in 
Hermione Granger lives in 
Minerva McGonagall lives in 
Albus Dumbledore lives in 
Harry Potter has a pet
Ron Weasley has a pet
Hermione Granger has a pet
Albus Dumbledore has a pet

@Luro91 Luro91 removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 16, 2026
@Ofonimeedak Ofonimeedak requested a review from Luro91 April 18, 2026 18:24
@Ofonimeedak Ofonimeedak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 18, 2026

function orderReceipt(orderItems) {
const totalList = [];
console.log("QTY ITEM TOTAL");
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 alignment of ITEM does not match:

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
-----------------

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 item column is not aligned

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
-----------------


//Task2

function teacherWithPet(WizardAndWitch) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

How can you ensure that you only use teacheres for exercise 2?

- In exercise.jswrite a program that will take thehogwartsarray as input and display the names of teachers who have pets.

Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Task 2 should only show teachers who have a pet. At the moment it is everyone in the list.

@Luro91 Luro91 removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 19, 2026
@Ofonimeedak Ofonimeedak added the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 19, 2026
@Ofonimeedak Ofonimeedak requested a review from Luro91 April 19, 2026 16:16
@Luro91 Luro91 removed the Needs Review Trainee to add when requesting review. PRs without this label will not be reviewed. label Apr 22, 2026
@Ofonimeedak
Copy link
Copy Markdown
Author

Please kindly review my latest changes

function teacherWithPet(WizardAndWitch) {
for (let teacher of WizardAndWitch) {
const { firstName, lastName, pet,house } = teacher;
if (house === "Gryffindor" && pet!==null) {
Copy link
Copy Markdown

Choose a reason for hiding this comment

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

Why are you checking for the house? Only teachers should be logged.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

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

Thank you for your review. I have made changes. Please kindly have a look at the latest updates

@Ofonimeedak
Copy link
Copy Markdown
Author

Please kindly review the latest update

@Ofonimeedak Ofonimeedak requested a review from Luro91 May 3, 2026 14:46
@illicitonion
Copy link
Copy Markdown
Member

Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Module-Data-Flows The name of the module. Reviewed Volunteer to add when completing a review with trainee action still to take. 📅 Sprint 1 Assigned during Sprint 1 of this module

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants