This is what I'm trying to do, I have an array
var arr = [1, 2, 3, 4, 5];
then I want to create a new array each time by removing an item once i.e when i remove item at index 0 i should have [2, 3, 4, 5]
and when i remove an item at index 1, I should have [1, 3, 4, 5]
and so on till i get to arr.length-1
and each time i remove an item i still want my arr
to be intact unchanged
using javaScript I have tried some array methods like splice, slice but all that changes the value of arr
how do i go about it with either javascript or python.