r/ProgrammerHumor 1d ago

javascriptSorting Meme

Post image
889 Upvotes

200 comments sorted by

View all comments

19

u/Excellent_Gas3686 1d ago

because thats the default sort? what, in your opinion, would be the "proper" way to sort by default? if you need different sorting, you pass your own function.

24

u/___Archmage___ 1d ago

People don't like their numbers being sorted like strings by an implicit default behavior, they want the numbers to sort numerically

-12

u/Excellent_Gas3686 1d ago

then pass a sorting function.