Tell us what’s happening:
Describe your issue in detail here.
**Your code so far**
const globalArray = [5, 6, 3, 2, 9];
function nonMutatingSort(arr) {
// Only change code below this line
return[].concat(arr).sort(function(a , b){
a - b;
});
// Only change code above this line
}
nonMutatingSort(globalArray);
**Your browser information:**
User Agent is: Mozilla/5.0 (iPhone; CPU iPhone OS 15_4_1 like Mac OS X) AppleWebKit/605.1.15 (KHTML, like Gecko) Version/15.4 Mobile/15E148 Safari/604.1
Challenge: Return a Sorted Array Without Changing the Original Array
Link to the challenge: