# Array Question

**URL:** <https://forum.kirupa.com/t/array-question/138229>\
**Category:** Uncategorized\
**Created:** [February 21, 2005, 5:22am UTC](https://forum.kirupa.com/t/array-question/138229 "2005-02-21T05:22:09Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ChaosKindred](https://avatars.discourse-cdn.com/v4/letter/c/d9b06d/32.png) [@ChaosKindred](https://forum.kirupa.com/u/ChaosKindred)\
**Post date:** [February 21, 2005, 5:22am UTC](https://forum.kirupa.com/t/array-question/138229/1 "2005-02-21T05:22:09Z")

</div>

Hey, im making a SpaceShooter game and I am using 2 arrays to hold enemys and lasers so that I can use for…in loops to detect collision and such. I have a function that spawns the enemy or laser and puts them into the array[aray.length], but when i have them destroyed I realized I can’t delete its spot in the array, which ends up slowing down my game after a while. Does anyone know how I can keep this array clean?
