• Swiggles@lemmy.blahaj.zone
      link
      fedilink
      arrow-up
      1
      ·
      1 year ago

      It’s just sorted alphabetically (technically it is the UTF16 code order). To be fair it’s a sane default for most use cases. In JS case you can define a very simple callback to change the behavior to numeric sorting (a,b => a<b). Many other sorters provide a flag instead, but numeric sorting is seldom the default as it is not as useful most of the time in weakly typed languages.