# Array.slice()

**URL:** <https://forum.kirupa.com/t/array-slice/71975>\
**Category:** flash\
**Created:** [December 1, 2004, 4:00am UTC](https://forum.kirupa.com/t/array-slice/71975 "2004-12-01T04:00:44Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Glitch](https://avatars.discourse-cdn.com/v4/letter/g/0ea827/32.png) [@Glitch](https://forum.kirupa.com/u/Glitch)\
**Post date:** [December 1, 2004, 4:00am UTC](https://forum.kirupa.com/t/array-slice/71975/1 "2004-12-01T04:00:44Z")

</div>

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

```auto

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:

```auto

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:
