r/programminghorror
•
u/Leonnee
•
Jun 12 '25
•
1
Javascript Javascript is filled with horror
2.4k
Upvotes
View all comments
Show parent comment
0
u/DrShocker Jun 12 '25
I see what you're saying. I don't see how lexicographic comparison is the only solution that provides the same qualities. It could have for example assumed the elements were numbers and fall back on lexicographic comparsion if they aren't.