DEV Community

Discussion on: ECMAScript 2019 and beyond...

Collapse
 
pixievoltno1 profile image
Pixievolt No. 1

The description of .flatMap() is incorrect - it works like .map(), then .flat(1). That's a lot more useful, as it lets your mapping function return zero- or multiple-element arrays to change the number of elements in the result.

Collapse
 
areknawo profile image
Arek Nawo

Thanks for the notice! I edited the article.