# Cleaning up arrays

**URL:** <https://forum.kirupa.com/t/cleaning-up-arrays/225820>\
**Category:** flash\
**Created:** [May 16, 2007, 1:21am UTC](https://forum.kirupa.com/t/cleaning-up-arrays/225820 "2007-05-16T01:21:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![kingofnukes](https://avatars.discourse-cdn.com/v4/letter/k/9d8465/32.png) [@kingofnukes](https://forum.kirupa.com/u/kingofnukes)\
**Post date:** [May 16, 2007, 1:21am UTC](https://forum.kirupa.com/t/cleaning-up-arrays/225820/1 "2007-05-16T01:21:56Z")

</div>

I was wondering how to check an array for a blank index and removing it.

Right now I have this:  
[AS]  
function cleanArray (it)  
{  
for (var i = 0; i \< it.length; i++)  
{  
if (it \* == undefined)  
{  
it.splice (i, 1);  
}  
}  
}  
[/AS]

But it doesnt seem t work for me. What do you usually use?
