Manchester | 26-ITP-Jan | Ofonime Edak | Sprint 1 | Feature/Destructuring#407
Manchester | 26-ITP-Jan | Ofonime Edak | Sprint 1 | Feature/Destructuring#407Ofonimeedak wants to merge 11 commits intoCodeYourFuture:mainfrom
Conversation
| } | ||
|
|
||
| introduceYourself(personOne); | ||
| console.log(introduceYourself(personOne)); |
There was a problem hiding this comment.
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
| return totalCost; | ||
| }, 0); | ||
| const finalBill = grandTotal.toFixed(2); | ||
| console.log(`Total:${finalBill}`); |
There was a problem hiding this comment.
The formatting of the console output does not match the requirements
Luro91
left a comment
There was a problem hiding this comment.
Please apply the correct label next time when you need another review as I am using them to see where I need to rereview
|
|
||
| function orderReceipt(orderItems) { | ||
| const totalList = []; | ||
| console.log("QUANTITY ITEM TOTAL"); |
There was a problem hiding this comment.
Thank you, I have worked on this. Please kindly review
| const { firstName, lastName, house } = mate; | ||
| if (house === "Gryffindor") { | ||
| const gryffindorMates = `${firstName} ${lastName} lives in `; | ||
| console.log(gryffindorMates); |
There was a problem hiding this comment.
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
|
|
||
| function orderReceipt(orderItems) { | ||
| const totalList = []; | ||
| console.log("QTY ITEM TOTAL"); |
There was a problem hiding this comment.
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
-----------------
There was a problem hiding this comment.
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) { |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Task 2 should only show teachers who have a pet. At the moment it is everyone in the list.
|
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) { |
There was a problem hiding this comment.
Why are you checking for the house? Only teachers should be logged.
There was a problem hiding this comment.
Thank you for your review. I have made changes. Please kindly have a look at the latest updates
|
Please kindly review the latest update |
|
Closing PR because the January ITP run has finished. Feel free to re-open if you're still working on it. |
Self checklist
Update and destructuring argument for a function
Write a function for the teacher's pet
print receipt function