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 f3763bf commit 4681446Copy full SHA for 4681446
04 - Array Cardio Day 1/index-START.html
@@ -53,6 +53,16 @@
53
54
// 5. Sort the inventors by years lived
55
56
+ const ordLived = inventors.sort(function (a,b) {
57
+ const lastGuy = a.passed - a.year;
58
+ const nextGuy = b.passed - b.year;
59
+
60
+ return lastGuy > nextGuy ? -1 : 1;
61
62
+ });
63
64
+ console.table(ordLived);
65
66
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
67
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
68
0 commit comments