Return a new sorted array from the passed-in iterable. This function internally calls the Array.sort method, passing comparator.
comparator
An array.
// Returns [1, 2, 3]it.reduce([3, 1, 2], (a, b) => a - b) Copy
// Returns [1, 2, 3]it.reduce([3, 1, 2], (a, b) => a - b)
Return a new sorted array from the passed-in iterable. This function internally calls the Array.sort method, passing
comparator
.