reduce<T> method

T reduce<T>(
  1. T fn(
    1. T accumulator,
    2. T currentValue,
    3. int currentIndex,
    4. JsArray<E> array,
    ),
  2. T initialValue
)

Implementation

T reduce<T>(
        T Function(T accumulator, T currentValue, int currentIndex,
                JsArray<E> array)
            fn,
        T initialValue) =>
    jsu.callMethod(this, 'reduce', [allowInterop(fn), initialValue]);