Array.slice()

Heres an array of questions if you will…(pun :trout: )


Array = [ one, two, three, four, five, six ]
slice = array.slice( start, end )

Say i wanted to cut out “three” from the array so i was left with: [one, two, four, five, six]
is this possible with just slice? or is there other methods you would need to use?

Theoretically speaking…
now that my slice.length is 1 smaller than array.length, im confused on how to get my for loop to function correctly:


slice = [one, two, four, five, six]
xb = [array[0]._x, array[1]._x, array[2]._x etc etc];
yb = [array[0]._y, array[1]._y, array[2]._y etc etc];
for(x=0;x<slice.length;x++){
slice[x]._x=xb[x]
slice[x]._y=xb[x]
}

Now the for loop will run 5 times however since “three” has been removed, i need it to skip the 3 itteration. So it will make x: 1,2,4,5,6

Any suggestions?
:h: