Quiz
- I don't quite understand the localeCompare function
There are two parts to this answer. First,
localeCompare
is a method on a string that takes another string as an argument and returns negative (before), zero, or positive (after).It turns out that different languages (English, Swedish, French) sort strings differently, depending on the language. See Using Locales
- There is nothing I would like to talk more about, the reading was clear.
Amazing!