Skip to content

Commit 1ef4cf9

Browse files
author
Jeff Kohrman
committed
add paris boulevard 'de' filter
1 parent 024323c commit 1ef4cf9

File tree

1 file changed

+5
-1
lines changed

1 file changed

+5
-1
lines changed

04 - Array Cardio Day 1/index-START.html

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,11 @@
7676

7777
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
7878
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
79-
79+
const deBoulevards = Array.from(document.querySelector('.mw-category').querySelectorAll('a')).map(function (link) {
80+
return link.textContent;
81+
}).filter(function (text) {
82+
return text.includes('de');
83+
});
8084

8185
// 7. sort Exercise
8286
// Sort the people alphabetically by last name

0 commit comments

Comments
 (0)