ee.Reducer.toCollection

Returns a reducer that collects its inputs into a FeatureCollection.

UsageReturns
ee.Reducer.toCollection(propertyNames, numOptional)Reducer
ArgumentTypeDetails
propertyNamesListThe property names that will be defined on each output feature; determines the number of reducer inputs.
numOptionalInteger, default: 0The last numOptional inputs will be considered optional; the other inputs must be non-null or the input tuple will be dropped.