# MX: Quick-check an Array for "true" in all fields?

**URL:** <https://forum.kirupa.com/t/mx-quick-check-an-array-for-true-in-all-fields/163806>\
**Category:** flash\
**Created:** [September 26, 2005, 1:24pm UTC](https://forum.kirupa.com/t/mx-quick-check-an-array-for-true-in-all-fields/163806 "2005-09-26T13:24:23Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![CEOofAEP](https://avatars.discourse-cdn.com/v4/letter/c/7cd45c/32.png) [@CEOofAEP](https://forum.kirupa.com/u/CEOofAEP)\
**Post date:** [September 26, 2005, 1:24pm UTC](https://forum.kirupa.com/t/mx-quick-check-an-array-for-true-in-all-fields/163806/1 "2005-09-26T13:24:23Z")

</div>

I have an array that I want to check with a “setInterval”-triggered function.

Is there a way to do something like an “IF”-check on all entries / fields of an array? The array contains the feedback from another function, so each field can only be “true” or “false”.

What I want is something like this:  
IF (_all values from array X_ == true) {  
// [stuff]  
}

Only way I can think of is to set a dummy variable to “true”, do a for-loop through the array and check for “false” and if any of the entries is “false”, the dummy will be set to “false”, too- otherwise it will remain “true”…

any better ideas?  
Thanks 🙂
