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.