apply function

  1. @JS()
dynamic apply(
  1. List array,
  2. Function f, [
  3. dynamic context
])

Applies a function f to all elements of an array. Function f gets 3 arguments passed:

  • element from the array
  • index of the element
  • reference to the array

Implementation

@JS()
external apply(List<dynamic> array, Function f, [dynamic context]);