r/ProgrammerAnimemes • • Mar 22 '22

OC Sort using JS

3.2k Upvotes

77 comments sorted by

View all comments

Show parent comment

32

u/Widowan Mar 23 '22

By default, sort treats the array elements as strings and will sort in UTF-16 code unit order.

Wow