---
name: "forEachMember"
type: command
status: ok
groups: ["Program Flow"]
arma3_since: "0.50"
locality: {"argument": null, "effect": null, "server_exec": false}
source: https://community.bistudio.com/wiki/forEachMember
revid: 330644
updated: 2022-10-03T11:04:22Z
---

# forEachMember

*Command · Program Flow · Arma 3 v0.50 · introduced in Arma 2 v1.00*

## Description

Executes the given command recursively for both teams and agents that are members of the given team. For teams only use [forEachMemberTeam](../commands/forEachMemberTeam.md). For agents only use [forEachMemberAgent](../commands/forEachMemberAgent.md).

## Syntax

```sqf
command forEachMember team
```

**Parameters:**

- `command`: [Code](../topics/Code.md)
- `team`: [Team Member](../topics/Team_Member.md)

**Returns:** [Nothing](../topics/Nothing.md)

## See also

[addTeamMember](../commands/addTeamMember.md) · [createTeam](../commands/createTeam.md) · [deleteTeam](../commands/deleteTeam.md) · [forEachMemberTeam](../commands/forEachMemberTeam.md) · [removeTeamMember](../commands/removeTeamMember.md) · [teamMember](../commands/teamMember.md) · [teamName](../commands/teamName.md) · [teams](../commands/teams.md) · [teamType](../commands/teamType.md) · [forEachMemberAgent](../commands/forEachMemberAgent.md)

<sub>Source: [BI Community Wiki — forEachMember](https://community.bistudio.com/wiki/forEachMember) (revision 330644).</sub>
