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.

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
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:

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
3
Q

is sort destructive?

A

Yes

How well did you know this?
1
Not at all
2
3
4
5
Perfectly
4
Q

What is the rough UTF-16 code point order?

A

digits & punctuation, uppercase letters, then lowercase letters

How well did you know this?
1
Not at all
2
3
4
5
Perfectly