# Array Help

**URL:** <https://forum.kirupa.com/t/array-help/295046>\
**Category:** Uncategorized\
**Created:** [August 24, 2009, 6:34pm UTC](https://forum.kirupa.com/t/array-help/295046 "2009-08-24T18:34:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Snivvle](https://avatars.discourse-cdn.com/v4/letter/s/edb3f5/32.png) [@Snivvle](https://forum.kirupa.com/u/Snivvle)\
**Post date:** [August 24, 2009, 6:34pm UTC](https://forum.kirupa.com/t/array-help/295046/1 "2009-08-24T18:34:48Z")

</div>

Hey,

I work on AS3 one week, and then take a break for a few weeks, then work on it a day, take a break, etc… So I forget some of the basics, and need refreshers. I think I need to stop taking breaks. :disco:

Anyway, need help with this.

**[COLOR=“Red”]Problem[/COLOR]**  
I push multiple strings into an array, and some of the strings are the same.

```auto
var myArray = new Array();
myArray.push (Snivvle);
myArray.push (Kirupa);
myArray.push (Snivvle);

```

I want to find out which element positions “Snivvle” hogs up. We can see that it would be using element 0 and 2, and if we do an “indexOf” we would only get to see element 0, and doing a “lastIndexOf” we would only see element 2. How do I find out ALL of the element positions “Snivvle” is located in, so that it returns: element 0, element 2.

Thanks!
