feat: didn't read the note lol

This commit is contained in:
afiqzudinhadi 2024-07-12 15:43:29 +08:00
parent f89f9045e2
commit b8900381d6

View file

@ -24,6 +24,11 @@ const groupedArray = array.reduce((newArray, item) => {
return newArray; return newArray;
}, []); }, []);
console.log(
`Here's your arrays in an array (ordered by first appearance):`,
groupedArray
);
groupedArray.sort((a, b) => { groupedArray.sort((a, b) => {
const valueA = a[0]; const valueA = a[0];
const valueB = b[0]; const valueB = b[0];