Sorting an array of strings is simple because you don’t have to do anything at all! If no function is supplied, sorting is done by [ "I", "MYSELF", "OF", "TRoubLE", "When", "Find", "tiMes" The solution to this is the.localeCompare() method, that recognizes different languages. In Spanish, “Ñ” comes between “mítico” and “oasis.

9m read timeFrom blog.openreplay.com
Post cover image
Table of contents
Sorting stringsSorting numbers and datesSorting booleansOpen Source Session ReplaySorting objectsSorting — functionally?Conclusion
3 Impressions