DekGenius.com
Home
(current)
Dictionary
BOOKS
LYRICS
CHORD
SCRIPT & CODE EXAMPLE
Karaoke language
Search
Go
SCRIPT & CODE EXAMPLE
CODE EXAMPLE FOR JAVASCRIPT
Even numbers in an array
const
evenNumbers
=
(
array
,
number
)
=>
array
.
filter
(
item
=>
item
%
2
===
0
)
.
slice
(
-
number
)
;
PREVIOUS
NEXT
Tagged:
#Even
#numbers
#array
ADD COMMENT
Topic
COMMENT
Name
7+5 =
Submit