Web features explorer

Array flat() and flatMap()

Widely available since 2022-07-15
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.

Learning resources on MDN

Browser support (view on caniuse.com)