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
Amazing!