Return a sorted copy of the provided iterable or array-like object.
element type
iterable or array-like input
optional compare function (defaults to cmp)
cmp
a new array sorted according to compareFn
compareFn
Return a sorted copy of the provided iterable or array-like object.