🏠 New in Low Baseline Support: Array flat() and flatMap()
January 15, 2020
caniuse · mdn · [spec]([‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.flat’, ‘https://tc39.es/ecma262/multipage/indexed-collections.html#sec-array.prototype.flatmap’])
The flat()
and flatMap()
methods for arrays creates a new array such that each nested array item is concatenated into it.