map function

  1. @JS()
List map(
  1. List array,
  2. Function f
)

Maps all elements of the array and returns the result. Function f gets 4 arguments passed:

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

Implementation

@JS()
external List<dynamic> map(List<dynamic> array, Function f);