# \[cs4\] array.indexOf(\[1,2\]) = -1?

**URL:** https://forum.kirupa.com/t/cs4-array-indexof-1-2-1/314454
**Category:** flash
**Created:** [September 29, 2010, 4:54am UTC](https://forum.kirupa.com/t/cs4-array-indexof-1-2-1/314454 "2010-09-29T04:54:04Z")
**Posts on this page:** 1
**Page:** 1

<div class="post-metadata">

### Author: ![mothmann](https://avatars.discourse-cdn.com/v4/letter/m/71c47a/32.png) [@mothmann](https://forum.kirupa.com/u/mothmann)
#### Post date: [September 29, 2010, 4:54am UTC](https://forum.kirupa.com/t/cs4-array-indexof-1-2-1/314454/1 "2010-09-29T04:54:04Z")

</div>

sure its been asked before but I cannot find it via google or forum search.

So i have a 2d array.  
ar1[0]=[1,2]  
ar1[1]=[3,4]

this doesn’t work obviously

ar1.indexOf([1,2]);  
neither does any version of that i can think of using quotes, parentheses etc. tryed casting as well.

this returns false  
if (ar1[0]===“1,2”)

this returns true  
if (ar1[0]==“1,2”)

im assuming the strict equailty is what causes the first to fail. Is there a clean workaround? am i missing something? or is this just not possible?
