Skip to content

Commit 14d83f0

Browse files
committed
Answer wesbos#3
1 parent 837410e commit 14d83f0

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,8 @@
5050

5151
// Array.prototype.sort()
5252
// 3. Sort the inventors by birthdate, oldest to youngest
53+
const sorted = inventors.sort((a, b) => a.year - b.year)
54+
console.table(sorted);
5355

5456
// Array.prototype.reduce()
5557
// 4. How many years did all the inventors live all together?

0 commit comments

Comments
 (0)