Last updated 6 months ago
The filter function can be used to filter the contents of an array. It's functions in a similar way to .
filter
[1, 2, 3].filter($this > 1) // [2, 3]