Thanks to visit codestin.com Credit goes to github.com
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.
2 parents cd50b94 + 3f1273c commit 2b9e008Copy full SHA for 2b9e008
04 - Array Cardio Day 1/index-FINISHED.html
@@ -81,8 +81,8 @@
81
// 7. sort Exercise
82
// Sort the people alphabetically by last name
83
const alpha = people.sort((lastOne, nextOne) => {
84
- const [aFirst, aLast] = lastOne.split(', ');
85
- const [bFirst, bLast] = nextOne.split(', ');
+ const [aLast, aFirst] = lastOne.split(', ');
+ const [bLast, bFirst] = nextOne.split(', ');
86
return aLast > bLast ? 1 : -1;
87
});
88
console.log(alpha);
0 commit comments