filter
The filter function can be used to filter the contents of an array. It’s functions in a similar way to javascripts Array.prototype.filter.
Examples
[1, 2, 3].filter($this > 1)
// [2, 3]
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
The filter function can be used to filter the contents of an array. It’s functions in a similar way to javascripts Array.prototype.filter.
[1, 2, 3].filter($this > 1)
// [2, 3]