Skip to content

Commit aa43f71

Browse files
authored
female inventors + change in const name
A random selection of female inventors for the dataset along with proposed change in const name.
1 parent b56c911 commit aa43f71

File tree

1 file changed

+8
-3
lines changed

1 file changed

+8
-3
lines changed

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

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

2429
const people = ['Beck, Glenn', 'Becker, Carl', 'Beckett, Samuel', 'Beddoes, Mick', 'Beecher, Henry', 'Beethoven, Ludwig', 'Begin, Menachem', 'Belloc, Hilaire', 'Bellow, Saul', 'Benchley, Robert', 'Benenson, Peter', 'Ben-Gurion, David', 'Benjamin, Walter', 'Benn, Tony', 'Bennington, Chester', 'Benson, Leana', 'Bent, Silas', 'Bentsen, Lloyd', 'Berger, Ric', 'Bergman, Ingmar', 'Berio, Luciano', 'Berle, Milton', 'Berlin, Irving', 'Berne, Eric', 'Bernhard, Sandra', 'Berra, Yogi', 'Berry, Halle', 'Berry, Wendell', 'Bethea, Erin', 'Bevan, Aneurin', 'Bevel, Ken', 'Biden, Joseph', 'Bierce, Ambrose', 'Biko, Steve', 'Billings, Josh', 'Biondo, Frank', 'Birrell, Augustine', 'Black Elk', 'Blair, Robert', 'Blair, Tony', 'Blake, William'];
@@ -57,9 +62,9 @@
5762

5863
// 5. Sort the inventors by years lived
5964
const oldest = inventors.sort(function(a, b) {
60-
const lastGuy = a.passed - a.year;
61-
const nextGuy = b.passed - b.year;
62-
return lastGuy > nextGuy ? -1 : 1;
65+
const lastInventor = a.passed - a.year;
66+
const nextInventor = b.passed - b.year;
67+
return lastInventor > nextInventor ? -1 : 1;
6368
});
6469
console.table(oldest);
6570

0 commit comments

Comments
 (0)