JavaScript Professional — Medium
Key points
- Intl.Collator enables language-specific sorting
- localeCompare() considers accents and case for accurate sorting
- Unicode code points can lead to incorrect sorting of non-ASCII characters
- Simple < > comparison is not suitable for locale-aware sorting
Ready to go further?
Related questions
