Skip to main content
Version: v0.17.0

ForEach

Alias:ForEach, EntityForEach, ForEachItem

Output:Unit

Do an action for each element in an array

ParameterTypeRequiredPositionSummary
Array
In
array<T>✔1The array or entity stream to iterate over
Action
Do
T✔2The 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