# Attach Boolean to an Array

**URL:** <https://forum.kirupa.com/t/attach-boolean-to-an-array/291889>\
**Category:** flash\
**Created:** [July 7, 2009, 6:29am UTC](https://forum.kirupa.com/t/attach-boolean-to-an-array/291889 "2009-07-07T06:29:57Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![alterpath](https://avatars.discourse-cdn.com/v4/letter/a/f07891/32.png) [@alterpath](https://forum.kirupa.com/u/alterpath)\
**Post date:** [July 7, 2009, 6:29am UTC](https://forum.kirupa.com/t/attach-boolean-to-an-array/291889/1 "2009-07-07T06:29:57Z")

</div>

Hello all,

Is there a possibility to attach a boolean to specific array?

Like for example:

```auto
var flag= true;
var myArray= new Array;  

for(i=0; i<myArray.length; i+=1)
{
   result = doFunction();
   if(result == true)
   {
      myArray*.flag = true;
   }else{
      myArray*.flag = false;
   }
}

```

I’ll need to display that particular item in the array if it returns “true” in the flag.

Help will be greatly appreciated. Thanks!
