r/programminghorror
•
u/Leonnee
•
Jun 12 '25
•
1
Javascript Javascript is filled with horror
2.4k
Upvotes
View all comments
Show parent comment
2
u/TorbenKoehn Jun 12 '25
What? How is something that was explicitly decided as the default a „bug“? Do you understand what a bug is?
And what is your definition of „natively handling“? The parameter is always there, just that by default you pass
(a, b) => String(a).localeCompare(String(b))implicitly to it because it is the only thing all JS values share: being able to be casted to a string.