Javatpoint Logo
Javatpoint Logo

JavaScript TypedArray filter() Method

The filter() method creates a new array with all elements that pass the test implemented by the provided function. This method fills all the elements of an array from a start index to an end index with a static value. The filter() method does not apply the function for array elements without values.



CurrentValue (required): The value of the current element.

: The array index of the current element.

: The array you called filter() on.

: this_arg argument is used to tell the function to use this value when executing argument function.

Return value:

An array containing all the elements that pass the test. If no elements pass the test it returns an empty array.

Browser Support:

Chrome Yes
Edge Yes
Firefox 1.5
Opera Yes


JavaScript Array filter() Method

Test it Now



Youtube For Videos Join Our Youtube Channel: Join Now


Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Trending Technologies

B.Tech / MCA