# How to access array position

**URL:** <https://forum.kirupa.com/t/how-to-access-array-position/288727>\
**Category:** Uncategorized\
**Created:** [May 20, 2009, 8:44am UTC](https://forum.kirupa.com/t/how-to-access-array-position/288727 "2009-05-20T08:44:18Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![chelle](https://avatars.discourse-cdn.com/v4/letter/c/6bbea6/32.png) [@chelle](https://forum.kirupa.com/u/chelle)\
**Post date:** [May 20, 2009, 8:44am UTC](https://forum.kirupa.com/t/how-to-access-array-position/288727/1 "2009-05-20T08:44:18Z")

</div>

i have an array and want to access the position of the array and replace by another number,how i wan do it.

var cardlist:Array = new Array();  
for(var i:uint=0;i\<16/2;i++) {  
cardlist.push(i);  
cardlist.push(i);  
}

var mylist:Array = new Array();  
var r:uint = Math.floor(Math.random()\*cardlist.length);  
trace(cardlist[r]);  
trace(cardlist[3]);[COLOR=Navy]//how i wan to get position 3 data in the array  
[/COLOR]
