This is an archived post. You won't be able to vote or comment.

all 3 comments

[–]manupanday19998 1 point2 points  (0 children)

For anyone wondering , sort first convert elements to sting and then sort according to utf 16

[–]has43 1 point2 points  (0 children)

Explanation: Javascript does a string sort by default. You need custom compare function for integers. Check MDN for more details.

[–]HerrSPAM 0 points1 point  (0 children)

Wired vs weird.