# Splice

**URL:** <https://forum.kirupa.com/t/splice/173906>\
**Category:** Uncategorized\
**Created:** [December 30, 2005, 6:23pm UTC](https://forum.kirupa.com/t/splice/173906 "2005-12-30T18:23:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ineedsleep](https://avatars.discourse-cdn.com/v4/letter/i/e5b9ba/32.png) [@Ineedsleep](https://forum.kirupa.com/u/Ineedsleep)\
**Post date:** [December 30, 2005, 6:23pm UTC](https://forum.kirupa.com/t/splice/173906/1 "2005-12-30T18:23:46Z")

</div>

why doesnt this work Im sure its something stupid Ive read the help files and it all seems correct some one please help

its meant to remove the number from the array once its been chosen

randArray = [-7,-6,-5,-4,-3,-2,-1,1,2,3,4,5,6,7];  
//picks answer  
randans1 = Math.ceil(Math.random()\*10);  
randArray.splice(randans1,1);  
trace(randans1);  
trace("1: " + randArray[randans1]);  
trace(randArray);

any help would be appreciated
