Skip to content

Commit d857090

Browse files
committed
I can get ga-wdi-exercises#2 but not ga-wdi-exercises#1 ahhhhhh
1 parent f4c8497 commit d857090

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

hof.js

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,9 +21,24 @@ var people = [
2121
// called `peopleNames`.
2222
// Type your solution immediately below this line:
2323

24+
var peopleNames = [];
2425

26+
people.map((value) => {
27+
peopleNames.name.push(value)
28+
return peopleNames;
29+
}
2530

2631
// #2: Use the `filter` array method to create a new, filtered array containing only
2732
// persons from the `people` array who know multiple languages. Assign the returned array
2833
// to a variable called `polyglotPeople`.
2934
// Type your solution immediately below this line:
35+
36+
var polyglotPeople = [];
37+
38+
people.filter(
39+
function(value) {
40+
if (value.knownLanguages > 1) {
41+
polyglotPeople.push(value);
42+
}
43+
}
44+
);

0 commit comments

Comments
 (0)