We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent a71afe1 commit e58b013Copy full SHA for e58b013
Sprint-1/destructuring/exercise-2/exercise.js
@@ -70,3 +70,14 @@ let hogwarts = [
70
occupation: "Teacher",
71
},
72
];
73
+
74
+function getGryffindors(arr) {
75
+ let Gryffindors = []
76
+ for (let person of arr) {
77
+ if (person["house"] === "Gryffindor") {
78
+ Gryffindors.push(`${person["firstName"]} ${person.lastName}`);
79
+ }
80
81
+ return Gryffindors;
82
+}
83
+console.log(getGryffindors(hogwarts));
0 commit comments