We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dc93584 commit 1dcedd3Copy full SHA for 1dcedd3
04 - Array Cardio Day 1/index-START.html
@@ -81,9 +81,15 @@
81
82
// Array.prototype.map()
83
// 2. Give us an array of the inventors first and last names
84
+ const inventorArray = inventors.map(
85
+ (inventor) => inventor.first + " " + inventor.last
86
+ );
87
+ console.table(inventorArray);
88
89
// Array.prototype.sort()
90
// 3. Sort the inventors by birthdate, oldest to youngest
91
+ const sortedBirthdate = inventors.sort((a, b) => a.year - b.year);
92
+ console.table(sortedBirthdate);
93
94
// Array.prototype.reduce()
95
// 4. How many years did all the inventors live all together?
0 commit comments