# Array Question

**URL:** <https://forum.kirupa.com/t/array-question/289537>\
**Category:** Uncategorized\
**Created:** [June 1, 2009, 4:02pm UTC](https://forum.kirupa.com/t/array-question/289537 "2009-06-01T16:02:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![ariel\_mirahy](https://avatars.discourse-cdn.com/v4/letter/a/dbc845/32.png) [@ariel\_mirahy](https://forum.kirupa.com/u/ariel_mirahy)\
**Post date:** [June 1, 2009, 4:02pm UTC](https://forum.kirupa.com/t/array-question/289537/1 "2009-06-01T16:02:48Z")

</div>

Hi,

I’m trying to make a game in which you are a detective…, I defined the winning variable which is an array:

[AS]var win:Array = new Array(level.Cat, level.Dog);[/AS]

which means that if I want to solve the case I will need to have the Cat and the Dog in my inventory, but if I have the Dog and the Cat (in that order) the case wont be solved.

So, what should I do to tell the array that the order of the items is irrelevant, but the specific items are strictly important?

For example, if I define:

[AS]var win:Array = new Array(level.Cat, level.Dog, level.Gun);[/AS]

When I find the 3 objects, no matter the order the case should be solved.

Thanks In Advance,

Areil
