Creates a shallow copy of the given array and sorts that copy. Does not modify the original array.
The array to copy and sort.
Optional
The comparision function to use for sorting.
Creates a shallow copy of the given array and sorts that copy. Does not modify the original array.