Sorting Flashcards
1
Q
how does the default js sort algorithm work
A
The default sort algorithm in JS converts values to strings and compares them by their unicode values.
2
Q
How are undefined values sorted?
A
They are always placed at the end of the array no matter what the other values are:
3
Q
is sort destructive?
A
Yes
4
Q
What is the rough UTF-16 code point order?
A
digits & punctuation, uppercase letters, then lowercase letters