London | 26-ITP-Sep | Mandip Sanger| Sprint 1 | Object destructuring - #583
Open
mandipsanger wants to merge 3 commits into
Open
mandipsanger wants to merge 3 commits into
mandipsanger wants to merge 3 commits into
Conversation
webmonch
self-requested a review
September 14, 2026 21:38
webmonch
reviewed
Sep 14, 2026
| // Task 1 | ||
| for (const { firstName, house } of hogwarts) { | ||
| if (house === "Gryffindor") { | ||
| console.log(firstName); |
There was a problem hiding this comment.
Did you manage to compare the output with the one described in readme.md?
webmonch
reviewed
Sep 14, 2026
| // Task 2 | ||
| for (const { firstName, occupation, pet } of hogwarts) { | ||
| if (occupation === "Teacher" && pet) { | ||
| console.log(firstName); |
webmonch
reviewed
Sep 14, 2026
| const itemTotal = quantity * unitPricePence; | ||
|
|
||
| console.log( | ||
| `${quantity} ${itemName.padEnd(20)}${(itemTotal / 100).toFixed(2)}` |
There was a problem hiding this comment.
Do you think this can be made more robust in terms of formatting structure?
Also did you manage to verify if output matches the one defined in readme for this exercise?
|
Good job!
Really clean use of destruction in the loop here. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Self checklist
Task code
CYF-1112
Changelist
3 exercise of feature/destructuring