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.
Table of contents
Sorting stringsSorting numbers and datesSorting booleansOpen Source Session ReplaySorting objectsSorting — functionally?Conclusion3 Impressions