Return a Sorted Array Without Changing the Original Array code example
Example: sort array without changing original array
let sorted = [].concat(arr).sort(function(a, b) {
return a - b;
})
let sorted = [].concat(arr).sort(function(a, b) {
return a - b;
})