Course · Section 9: Data Structures, Modern Operators and Strings · Lecture 111: The Spread Operator (...)
Implement `removeAt(list, index)` returning a new array without the element at `index`.
+ 1 hidden test run on Submit.
filter((_, i) => i !== index) walks the array and builds a new one containing every element except the one at the target index, without changing the original. An out-of-range index simply keeps all elements.
Run your code to see results.