DEV Community

Discussion on: The Array Iterators Cheatsheet (JavaScript)

Collapse
 
stephangalea profile image
Stephan Galea

All JavaScript goodies. There is also flatmap.

Collapse
 
ale3oula profile image
Alexandra

There are many more! I believe flatmap is similar to map?

Collapse
 
stephangalea profile image
Stephan Galea

It is a map() followed by flat() for a depth of one level. It is just more efficient than map when this behaviour is needed.
developer.mozilla.org/en-US/docs/W...