the sorted list
hashSort([2, 999, 3, 113, 3, 32, 3, 4])
// [2, 3, 3, 3, 4, 32, 113, 999]
hashSort(
[
{ age: 2 },{ age: 999 },{ age: 3 },
{ age: 113 },{ age: 3 },{ age: 32 },
{ age: 3 },{ age: 4 }
],
(item) => item.age
)
// [
// { age: 2 },{ age: 3 },{ age: 3 },
// { age: 3 },{ age: 4 },{ age: 32 },
// { age: 113 },{ age: 999 }
// ]
hash sort function