One thing is that you don’t need splice or the anonymous function wrapper. Spreading the array unpacks it into a list, effectively, which can be used as the argument to creating another array.
your code give the right result but i think that is not the way FCC wanted you to do the challenge.
you can try to do it without using splice method.
in your example
let arr2 = ...arr1;
that will throw an error because …arr1 can not be used alone.
think of like that.
the spread operator is a list of the items inside the array but it’s not an array itself.
if x = [1, 2 , 3]
…x here is 1,2,3 but it’s not an array you have to make it an array and that is possible without using any method
.