3 ms·
And just to throw another wrench in there, because it sorts by Unicode code points, capitals come before lowercase. So this: ['Banana', 'cherry', 'bagel', 'ap
by Klathmon 11y ago
And just to throw another wrench in there, because it sorts by Unicode code points, capitals come before lowercase.
So this:
['Banana', 'cherry', 'bagel', 'apple'].sort()
Will produce this order:
["Banana", "apple", "bagel", "cherry"]