Skip to main content
Version: Next

flattenReduceCallback

描述

¥Description

flattenReduce 的回调函数

¥Callback for flattenReduce

The first time the callback function is called, the values provided as arguments depend on whether the reduce method has an initialValue argument.

If an initialValue is provided to the reduce method:

  • The previousValue argument is initialValue.

  • The currentValue argument is the value of the first element present in the array.

If an initialValue is not provided:

  • The previousValue argument is the value of the first element present in the array.

  • The currentValue argument is the value of the second element present in the array.

定义

¥Definition

函数 (

¥function (

名称类型描述
previousValueReducerThe accumulated value previously returned in the last invocation of the callback, or initialValue, if supplied.
currentFeature特性The current Feature being processed.
featureIndexnumberThe current index of the Feature being processed.
multiFeatureIndexnumberThe current index of the Multi-Feature being processed.

)

返回

¥Returns

Reducer