Returns a new typed array from the elements of the given typed array that meet the condition specified in a callback function.
filter(predicate, thisArg?)
predicate function(value, index, array)
A function that accepts up to three arguments. The filter method calls the predicate function one time for each element in the array.
thisArg optional
An object to which the this keyword can refer in the predicate function. If thisArg is omitted, undefined is used as the this value.
New array after filtering.
new Int32Array([1, 2, 3, 4, 5]).filter(x => x != 0 && x % 2 == 0)
Int32Array [2, 4]