Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit 370743e

Browse files
committed
Revert "female inventors + change in const name"
This reverts commit aa43f71.
1 parent 201308d commit 370743e

File tree

1 file changed

+3
-8
lines changed

1 file changed

+3
-8
lines changed

04 - Array Cardio Day 1/index-FINISHED.html

Lines changed: 3 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -20,11 +20,6 @@
2020
{ first: 'Johannes', last: 'Kepler', year: 1571, passed: 1630 },
2121
{ first: 'Nicolaus', last: 'Copernicus', year: 1473, passed: 1543 },
2222
{ first: 'Max', last: 'Planck', year: 1858, passed: 1947 },
23-
{ first: 'Katherine', last: 'Blodgett', year: 1898, passed: 1979 },
24-
{ first: 'Ada', last: 'Lovelace', year: 1815, passed: 1852 },
25-
{ first: 'Sarah E.', last: 'Goode', year: 1855, passed: 1905 },
26-
{ first: 'Lise', last: 'Meitner', year: 1878, passed: 1968 },
27-
{ first: 'Hanna', last: 'Hammarström', year: 1829, passed: 1909 }
2823
];
2924

3025
const people = [
@@ -69,9 +64,9 @@
6964

7065
// 5. Sort the inventors by years lived
7166
const oldest = inventors.sort(function(a, b) {
72-
const lastInventor = a.passed - a.year;
73-
const nextInventor = b.passed - b.year;
74-
return lastInventor > nextInventor ? -1 : 1;
67+
const lastGuy = a.passed - a.year;
68+
const nextGuy = b.passed - b.year;
69+
return lastGuy > nextGuy ? -1 : 1;
7570
});
7671
console.table(oldest);
7772

0 commit comments

Comments
 (0)