Sort an array with null values first
null
const array = ["b", null, "a"];array.sort(nullFirst(stringComparator));console.log(array); // [null, "a", "b"]
a Comparator
the Comparator value type
Generated using TypeDoc
Example
Sort an array with
nullvalues firstReturns
a Comparator