sort array without changing original array

Solutions on MaxInterview for sort array without changing original array by the best coders in the world

showing results for - "sort array without changing original array"
Max
17 Sep 2018
1let sorted  = [].concat(arr).sort(function(a, b) {
2    return a - b;
3  })
4
Adrienne
28 Apr 2019
14 54 67 21 6