jskatas.org Continuously Learn JavaScript. Your Way.

Array API: array.flatMap()

array.flatMap() maps over each element and flattens it afterwards

array.flatMap() maps over each element and flattens it afterwards

Links

Description of array.flatMap() on MDN.
Blog post on flat and flatMap, on the v8 blog.
"#SmooshGate FAQ"
".flatMap(): mapping to zero or more values " by Axel Rauschmayer

Required Knowledge

Related Katas

Array API

Difficulty Level

INTERMEDIATE