Skip to content

Commit 7218c63

Browse files
committed
04 - Array Cardio Day 1: Answer wesbos#3
1 parent a5ad5fe commit 7218c63

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

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

+2
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)