diff --git a/01 - JavaScript Drum Kit/index-FINISHED.html b/01 - JavaScript Drum Kit/index-FINISHED.html index 1a16d0997c..affbe67357 100644 --- a/01 - JavaScript Drum Kit/index-FINISHED.html +++ b/01 - JavaScript Drum Kit/index-FINISHED.html @@ -58,23 +58,42 @@ diff --git a/04 - Array Cardio Day 1/index-FINISHED.html b/04 - Array Cardio Day 1/index-FINISHED.html index d1f6ce33d6..32fa9a12d9 100644 --- a/04 - Array Cardio Day 1/index-FINISHED.html +++ b/04 - Array Cardio Day 1/index-FINISHED.html @@ -74,6 +74,9 @@ return lastInventor > nextInventor ? -1 : 1; }); console.table(oldest); + // ALTERNATIVE =================================================================================> + const sortByLiving = inventors.sort((a,b) => (a.passed - a.year) > (b.passed - b.year) ? -1 : 1); + console.table(sortByLiving) // 6. create a list of Boulevards in Paris that contain 'de' anywhere in the name // https://en.wikipedia.org/wiki/Category:Boulevards_in_Paris