We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 469b59a commit 7a059b4Copy full SHA for 7a059b4
04 - Array Cardio Day 1/index-START.html
@@ -62,6 +62,12 @@
62
console.log(years);
63
64
// 5. Sort the inventors by years lived
65
+ const oldest = inventors.sort((a, b) => {
66
+ const firstAge = a.passed - a.year
67
+ const secondAge = b.passed - b.year
68
+ return secondAge - firstAge
69
+ })
70
+ console.table(oldest)
71
72
// 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name
73
// https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris
0 commit comments