Skip to main content
Code Cinema
JavaScript
map & filter
Transform arrays with callbacks. Watch each element react.
l
e
t
n
u
m
s
=
[
1
,
2
,
3
,
4
,
5
]
;
n
u
m
s
.
m
a
p
(
x
=
>
x
*
2
)
;
n
u
m
s
.
f
i
l
t
e
r
(
x
=
>
x
>
2
)
;
Click here and start typing...
Higher-order functions — transform arrays
Type the first line to create the array...