Skip to main content
canisoon
flat & flatMap array methods
93.9
JS
Methods to flatten any sub-arrays found in an array by concatenating their elements.
Further reading:
Can I use page for: flat & flatMap array methods
MDN article on Array.prototype.flat
MDN article on Array.prototype.flatMap
Article on the history of the `flat` methods
Polyfill for flat & flatMap
Polyfill for this feature is available in the core-js library