WeCodeAcademy
❮ findIndex()map() ❯

filter()

A new array of items that pass a test.

Group: Array

Syntax

array.filter(fn)

Example

Examplejavascript
Open in editor »

← All of JavaScript Reference