Web features explorer

Array flat() and flatMap()

Widely available
Tags: javascript Groups: JavaScript > Collections > Arrays

The flat() and flatMap() methods for arrays creates a new array such that each nested array item is concatenated into it. To learn more, see Array.prototype.flat(), Array.prototype.flatMap() at MDN.

Compatibility (view on caniuse.com)