Skip to content

Commit 41473aa

Browse files
committed
completed wesbos#3 Array.prototype.sort()
1 parent e7d5c74 commit 41473aa

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
@@ -47,6 +47,8 @@
4747

4848
// Array.prototype.sort()
4949
// 3. Sort the inventors by birthdate, oldest to youngest
50+
inventors.sort( (a, b) => a.year - b.year ); //oldest listed first
51+
console.table(inventors);
5052

5153
// Array.prototype.reduce()
5254
// 4. How many years did all the inventors live?

0 commit comments

Comments
 (0)