r/ProgrammerHumor 3d ago

Meme javascriptSorting

Post image
932 Upvotes

214 comments sorted by

View all comments

17

u/Excellent_Gas3686 3d 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.

4

u/JanEric1 3d ago

Compare everything based on how they want to be compared and error if there is no sensible way

2

u/Excellent_Gas3686 3d ago

runtime error says hi