MDN Web Docs
developer.mozilla.org › en-US › docs › Web › JavaScript › Reference › Global_Objects › Array › filter
Array.prototype.filter() - JavaScript | MDN
December 13, 2025 - The filter() method of Array instances creates a shallow copy of a portion of a given array, filtered down to just the elements from the given array that pass the test implemented by the provided function.
Videos
JavaScript filter() method in 6 minutes!
04:18
JavaScript Array Filter Method - Basic Example & Real Project Example ...
11:15
How to Use filter() in JavaScript | Filter Arrays Like a Pro - YouTube
02:58
JS Array Methods Explained #6 - FILTER Method - YouTube
06:57
Mastering the Javascript Array.filter Method: A Comprehensive Guide ...
00:49
Filter an Array of Objects with JavaScript - YouTube
W3Schools
w3schools.com › jsref › jsref_filter.asp
JavaScript Array filter() Method
The filter() method creates a new array filled with elements that pass a test provided by a function.
GitHub
github.com › zloirock › core-js
GitHub - zloirock/core-js: Standard Library
import 'core-js/actual'; Promise.try(() => 42).then(it => console.log(it)); // => 42 Array.from(new Set([1, 2, 3]).union(new Set([3, 4, 5]))); // => [1, 2, 3, 4, 5] [1, 2].flatMap(it => [it, it]); // => [1, 1, 2, 2] Iterator.concat([1, 2], function * (i) { while (true) yield i++; }(3)) .drop(1).take(5) .filter(it => it % 2) .map(it => it ** 2) .toArray(); // => [9, 25] structuredClone(new Set([1, 2, 3])); // => new Set([1, 2, 3])
Starred by 25.5K users
Forked by 1.7K users
Languages JavaScript
Programiz
programiz.com › javascript › library › array › filter
Javascript Array filter()
Returns a new array with only the elements that passed the test. ... const prices = [1800, 2000, null, 3000, 5000, "Thousand", 500, 8000] function checkPrice(element) { return element > 2000 && !Number.isNaN(element); } let filteredPrices = prices.filter(checkPrice); console.log(filteredPrices); ...
Codecademy
codecademy.com › docs › javascript › arrays › .filter()
JavaScript | Arrays | .filter() | Codecademy
July 29, 2025 - JavaScript’s array.filter() method creates a new array containing only the elements from the original array that pass a test implemented by a provided function.
Adripofjavascript
adripofjavascript.com › blog › drips › filtering-arrays-with-array-filter.html
Filtering Arrays with Array#filter - A Drip of JavaScript
This allows you to create more complex filters that depend on the element's relationship with other elements, or the array as a whole.