# Simple question: find location of element in array \[renamed\]

**URL:** <https://forum.kirupa.com/t/simple-question-find-location-of-element-in-array-renamed/315798>\
**Category:** flash\
**Created:** [November 4, 2010, 12:44pm UTC](https://forum.kirupa.com/t/simple-question-find-location-of-element-in-array-renamed/315798 "2010-11-04T12:44:56Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![LoveTheresa](https://avatars.discourse-cdn.com/v4/letter/l/aeb1de/32.png) [@LoveTheresa](https://forum.kirupa.com/u/LoveTheresa)\
**Post date:** [November 4, 2010, 12:44pm UTC](https://forum.kirupa.com/t/simple-question-find-location-of-element-in-array-renamed/315798/1 "2010-11-04T12:44:56Z")

</div>

please help me solve this simple question:

given an arrayA = [a, b, c] and  
arrayB = [a1,a2,a3]

by using array[0].name, it will return “a”, is there any function that i can get the number “0” when i do something to “a” ?

I hope i make it clear here Xp

because i have 2 array here, i wanted to do something when the position of an element in an arrayA is same as the position of another element in arrayB.

for example  
trace(array[0].name); -\> output = A  
trace(array[0].???); -\> output = 0
