Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit cfe664e

Browse files
committed
Comment out wesbos#6 codes and sort wesbos#7 names alphabetically
1 parent ad89398 commit cfe664e

File tree

1 file changed

+9
-6
lines changed

1 file changed

+9
-6
lines changed

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

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -100,18 +100,21 @@
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-
});
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+
// });
108108

109-
de.filter(hasDe => hasDe.includes('de'));
109+
// de.filter(hasDe => hasDe.includes('de'));
110110

111111

112112
// 7. sort Exercise
113113
// Sort the people alphabetically by last name
114114

115+
const sortedNames = people.sort();
116+
console.log(sortedNames);
117+
115118
// 8. Reduce Exercise
116119
// Sum up the instances of each of these
117120
const data = ['car', 'car', 'truck', 'truck', 'bike', 'walk', 'car', 'van', 'bike', 'walk', 'car', 'van', 'car', 'truck' ];

0 commit comments

Comments
 (0)