File tree Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Expand file tree Collapse file tree 1 file changed +12
-1
lines changed Original file line number Diff line number Diff line change 2727
2828 // Array.prototype.filter()
2929 // 1. Filter the list of inventors for those who were born in the 1500's
30+
31+ const inventorsBornInThe1500s = inventors . filter ( inventor => inventor . year >= 1500 && inventor . year < 1600 ) ;
32+
33+ console . table ( inventorsBornInThe1500s ) ;
3034
3135 // Array.prototype.map()
3236 // 2. Give us an array of the inventory first and last names
37+ const firstAndLastNames = inventors . map ( inventor => `${ inventor . first } ${ inventor . last } ` ) ;
38+ console . table ( firstAndLastNames ) ;
3339
3440 // Array.prototype.sort()
3541 // 3. Sort the inventors by birthdate, oldest to youngest
42+ const ordered = inventors . sort ( function ( a , b ) {
43+ // return a.
44+ } ) ;
3645
3746 // Array.prototype.reduce()
3847 // 4. How many years did all the inventors live?
48+ const years = inventors . reduce ( function ( inventor ) {
49+
50+ } ) ;
3951
4052 // 5. Sort the inventors by years lived
4153
4254 // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
4355 // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
4456
45-
4657 // 7. sort Exercise
4758 // Sort the people alphabetically by last name
4859
You can’t perform that action at this time.
0 commit comments