We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Keeps values which pass a test. 🏃 📼 📦 🌔 📒
Alternatives: default, update.
array.filter(x, fn, [ths]); // x: an array // fn: test function (v, i, x) // ths: this argument
const array = require('extra-array'); var x = [1, 2, 3, 4, 5]; array.filter(x, v => v % 2 === 1); // [ 1, 3, 5 ] array.filter(x, v => v % 2 === 0); // [ 2, 4 ]
There was an error while loading. Please reload this page.