im confuse with Array

im sorry if this is a newbie question but this make me confuses and i dont know what word i must type on google to find answer of my question

straight to my problem here my code

void OnEquipChecker(ItemType type)
    {
        Item_Script[] items = FindObjectsOfType(typeof(Item_Script)) as Item_Script[];

        foreach (Item_Script item in items)
        {
            if (item.isAlreadyEquip == 1)
            {
                // here what im working
                // and the result is all item with variable isAlreadyEquip change too not just ItemType.Support
                if(type == ItemType.Support)
                    item.isAlreadyEquip = 0;
            }
        }
    }

my question is how to change all variable isAlreadyEquip with ItemType.Support and not affected all other ItemType?

Try changing this line:

if(type == ItemType.Support)

to:

if(item.type == ItemType.Support)

In the first line, you’re testing the variable ‘type’ from the object the script is running on, not the item in the list.