File tree Expand file tree Collapse file tree 2 files changed +10
-4
lines changed
week-3/Homework/mandatory/2-exercises Expand file tree Collapse file tree 2 files changed +10
-4
lines changed Original file line number Diff line number Diff line change 1+ # Exercise 2
2+
3+ _ Need some help? Refresh your memory with [ this article] ( https://www.freecodecamp.org/news/array-destructuring-in-es6-30e398f21d10/ ) _
4+
15In ` exercise-2.js ` , you have an array that contains a list of people who are at Hogwarts School of Witchcraft and Wizardry.
26For each character you have the following information:
37
@@ -7,12 +11,12 @@ For each character you have the following information:
711- Pet
812- Occupation
913
10- # Exercise 1
14+ ## Task 1
1115
1216- In ` exercise-2.js ` write a program that will display the names of the people who belong to the Gryffindor house.
1317- Use array destructuring to extract the values you need out of the array.
1418
15- ## Expected result
19+ ### Expected result
1620
1721```
1822Harry Potter
@@ -22,12 +26,12 @@ Minerva McGonagall
2226Albus Dumbledore
2327```
2428
25- # Exercise 2
29+ ## Task 2
2630
2731- In ` exercise-2.js ` write a program that will display the names of teachers who have pets.
2832- Use array destructuring to extract the values you need out of the array.
2933
30- ## Expected result
34+ ### Expected result
3135
3236```
3337Albus Dumbledore
Original file line number Diff line number Diff line change 11# Exercise
22
3+ _ Need some help? Refresh your memory with [ this article] ( https://www.freecodecamp.org/news/array-destructuring-in-es6-30e398f21d10/ ) _
4+
35- In ` exercise-3.js ` , you have been provided with a takeout order. Write a program that will print out the receipt for this order.
46- Use array destructuring to extract the values you need from the order
57- Log each individual item to the console.
You can’t perform that action at this time.
0 commit comments