⊗jsPmIMFi 282 of 504 menu

filter method to filter an array in JavaScript

filter

Given an array of numbers. Leave only positive numbers in it.

Given an array of numbers. Leave only negative numbers in it.

Given an array of numbers. Leave in it only numbers that are greater than zero, but less than 10.

Given an array with strings. Leave in it only those strings whose length is more than 5 characters.

Given an array of numbers. Leave in it only those numbers whose product of their values and index numbers is less than 30.

An array is given, it can contain ordinary elements and subarrays, for example [1, 2, [3, 4], 5, [6, 7]]. Leave only ordinary elements in it.

English
AfrikaansAzərbaycanБългарскиবাংলাБеларускаяČeštinaDanskDeutschΕλληνικάEspañolEestiSuomiFrançaisहिन्दीMagyarՀայերենIndonesiaItaliano日本語ქართულიҚазақ한국어КыргызчаLietuviųLatviešuМакедонскиMelayuမြန်မာNederlandsNorskPolskiPortuguêsRomânăРусскийසිංහලSlovenčinaSlovenščinaShqipСрпскиSrpskiSvenskaKiswahiliТоҷикӣไทยTürkmenTürkçeЎзбекOʻzbekTiếng Việt
We use cookies for website operation, analytics, and personalization. Data processing is carried out in accordance with the Privacy Policy.
accept all customize decline