filter function
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);