Tell us what’s happening:
Hi, I find it a bit challening to grasp the concepts in the functional programming section, and have referred to the hints quite extensively.
I feel that it might help to understand different, alternative ways to solve the challenges. Does anyone know if there’s such a page/platform to compare workable codes beyond those in the hint section?
Thanks!
Your code so far
var globalArray = [5, 6, 3, 2, 9];
function nonMutatingSort(arr) {
// Add your code below this line
let newArr = [];
return newArr.concat[arr];
// Add your code above this line
}
nonMutatingSort(globalArray);
console.log(newArr);
Your browser information:
User Agent is: Mozilla/5.0 (X11; Linux x86_64; rv:60.0) Gecko/20100101 Firefox/60.0
.
Link to the challenge:
https://learn.freecodecamp.org/javascript-algorithms-and-data-structures/functional-programming/return-a-sorted-array-without-changing-the-original-array