filter function

  1. @JS()
List filter(
  1. List array,
  2. Function test
)

Filters elements of the array using a test function. Function test 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> filter(List<dynamic> array, Function test);