Hi Adam!
For strings, the String method localeCompare seems the right way to do it.
What downsides do you see with it? Might have a performance penalty but shouldn’t be relevant unless sorting a massive array?
Best.
Good question Alex! I'm not entirely sure. This was written a number of years ago while I worked for bravissimo.com (hence the example above being bra sizes!)
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
Hi Adam!
For strings, the String method localeCompare seems the right way to do it.
What downsides do you see with it? Might have a performance penalty but shouldn’t be relevant unless sorting a massive array?
Best.
Good question Alex! I'm not entirely sure. This was written a number of years ago while I worked for bravissimo.com (hence the example above being bra sizes!)