Executes a callback function for each element.

<void> Collection.forEach(<ForEachCallback> callback, [<ErrorCallback> errorCallback])

Parameters

Parameter Description
callback Receives each element of the collection.
errorCallback Optional. Is called when the operation failed with an error.

Further Reading

Learn more about the Javascript: Collection.forEach Method in the Text Control Blog: