Home > rc-js-util > ATypedArrayTuple > filter
Returns the elements of an array that meet the condition specified in a callback function.
Signature:
filter(_callbackfn: (value: number, index: TExtractIndexes<this>, array: this) => unknown, _thisArg?: unknown): TDecayedTypedArrayTuple;
Parameter | Type | Description |
---|---|---|
_callbackfn | (value: number, index: TExtractIndexes<this>, array: this) => unknown | A function that accepts up to three arguments. The filter method calls the _callbackfn function one time for each element in the array. |
_thisArg | unknown | (Optional) An object to which the this keyword can refer in the _callbackfn function. If _thisArg is omitted, undefined is used as the this value. |
Returns: