Why does this code
["Q", "fP", "AQ", "L"].sort((a,b) => a.localeCompare(b))
give this result:
["AQ", "fP", "L", "Q"]
I thought it would give me this (and that's what I need):
["AQ", "L", "Q", "fP"]
All uppercase letters come before lower case letters chortle.ccsu.edu/java5/Notes/chap92/ch92_2.html
["Q", "fP", "AQ", "L"].sort()would give you that outputa.localeCompare(b, "en", {sensitivity: 'case', caseFirst: "upper"})would work ... but it does not.