Skip to content

Commit ad89398

Browse files
committed
Complete exercise 6
1 parent 51c5b3e commit ad89398

File tree

1 file changed

+7
-0
lines changed

1 file changed

+7
-0
lines changed

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

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -100,6 +100,13 @@
100100

101101
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
102102
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
103+
const div = document.querySelector('.mw-category');
104+
const links = Array.from(div.querySelectorAll('a'));
105+
let de = links.map(function(link){
106+
return link.textContent;
107+
});
108+
109+
de.filter(hasDe => hasDe.includes('de'));
103110

104111

105112
// 7. sort Exercise

0 commit comments

Comments
 (0)