diff --git a/04 - Array Cardio Day 1/index-FINISHED.html b/04 - Array Cardio Day 1/index-FINISHED.html index e61b94c006..ede883f1f9 100644 --- a/04 - Array Cardio Day 1/index-FINISHED.html +++ b/04 - Array Cardio Day 1/index-FINISHED.html @@ -81,8 +81,8 @@ // 7. sort Exercise // Sort the people alphabetically by last name const alpha = people.sort((lastOne, nextOne) => { - const [aFirst, aLast] = lastOne.split(', '); - const [bFirst, bLast] = nextOne.split(', '); + const [aLast, aFirst] = lastOne.split(', '); + const [bLast, bFirst] = nextOne.split(', '); return aLast > bLast ? 1 : -1; }); console.log(alpha);