Compare displayed text in a way that makes sense to humans.
A negative number is a is smaller, a positive if bigger and undefined if a and b are equal.
array.sort((a, b) => { return compareDisplayText(a, b) ?? compareSomethingElse(a, b) ?? 0;}); Copy
array.sort((a, b) => { return compareDisplayText(a, b) ?? compareSomethingElse(a, b) ?? 0;});
Compare displayed text in a way that makes sense to humans.