ForEach
Alias:ForEach
, EntityForEach
, ForEachItem
Output:Unit
Do an action for each element in an array
Parameter | Type | Required | Position | Summary |
---|---|---|---|---|
Array In | array<T> | ✔ | 1 | The array or entity stream to iterate over |
Action Do | T | ✔ | 2 | The action to perform on each iteration |
Examples​
Example 1​
SCL​
ForEach [1, 2, 3] Action: (Log <item>)
Expected Logs​
1
2
3
Example 2​
SCL​
ForEachItem In: [1, 2, 3] Do: (Log <item>)
Expected Logs​
1
2
3