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 7608b21 commit 7ccfd67Copy full SHA for 7ccfd67
04 - Array Cardio Day 1/index-START.html
@@ -60,10 +60,16 @@
60
console.table(totalYears);
61
62
// 5. Sort the inventors by years lived
63
+ const yearsLived = inventors.sort((a, b) => {
64
+ const aLived = a.passed - a.year;
65
+ const bLived = b.passed - b.year;
66
+ return bLived - aLived;
67
+ });
68
+ console.table(yearsLived);
69
70
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
71
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
-
72
+
73
74
// 7. sort Exercise
75
// Sort the people alphabetically by last name
0 commit comments