# Deleting array values and gaps

**URL:** https://forum.kirupa.com/t/deleting-array-values-and-gaps/165706
**Category:** flash
**Created:** [October 13, 2005, 12:24pm UTC](https://forum.kirupa.com/t/deleting-array-values-and-gaps/165706 "2005-10-13T12:24:16Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![theHollow](https://yyz1.discourse-cdn.com/flex011/user_avatar/forum.kirupa.com/thehollow/32/106_2.png) [@theHollow](https://forum.kirupa.com/u/theHollow)
#### Post date: [October 13, 2005, 12:24pm UTC](https://forum.kirupa.com/t/deleting-array-values-and-gaps/165706/1 "2005-10-13T12:24:16Z")

</div>

if i have the following array

myArray[0] = “value 0”;  
myArray[1] = “value 1”;  
myArray[2] = “value 2”;  
myArray[3] = “value 3”;

and i delete the second the value. is there anyway to stop it looking like this:

myArray[0] = “value 0”;  
myArray[1] = undefined;  
myArray[2] = “value 2”;  
myArray[3] = “value 3”;

and make it look like this:

myArray[0] = “value 0”;  
myArray[1] = “value 2”;  
myArray[2] = “value 3”;

Thanks,  
Brendan Smith
