We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 3fbcb86 commit e51ecfbCopy full SHA for e51ecfb
04 - Array Cardio Day 1/index-START.html
@@ -54,7 +54,7 @@
54
// 5. Sort the inventors by years lived
55
const sortedYearsLived = inventors.sort(yearsLived);
56
57
- function yearsLived(a,b){
+ function yearsLived(a,b) {
58
return ((b.passed-b.year)-(a.passed-a.year));
59
}
60
@@ -68,11 +68,11 @@
68
// Sort the people alphabetically by last name
69
const sortedLastName = people.sort(sortByLastName);
70
71
- function sortByLastName(a,b){
+ function sortByLastName(a,b) {
72
return (getLastName(a)>getLastName(b));
73
74
75
- function getLastName(nameValue){
+ function getLastName(nameValue) {
76
let fullName = nameValue.split(", ");
77
return fullName[0];
78
0 commit comments