ee.ImageCollection.iterate

Applies a user-supplied function to each element of a collection. The user-supplied function is given two arguments: the current element, and the value returned by the previous call to iterate() or the first argument, for the first iteration. The result is the value returned by the final call to the user-supplied function.

Returns the result of the Collection.iterate() call.

UsageReturns
ImageCollection.iterate(algorithm, first)ComputedObject
ArgumentTypeDetails
this: collectionCollectionThe Collection instance.
algorithmFunctionThe function to apply to each element. Must take two arguments: an element of the collection and the value from the previous iteration.
firstObject, optionalThe initial state.