DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
filter in javascript
const arr = [1, 2, 3, 4, 5, 6]; const filtered = arr.filter(el => el === 2 || el === 4); //[2, 4]
Source by developer.mozilla.org #
PREVIOUS
NEXT
Tagged:
#filter
#javascript
ADD COMMENT
Topic
COMMENT
Name
8+3 =
Submit