JSJS LanguageObjectArrayArrayArray instance methods.flat()On this page.flat() ↔ to return new Array with sub-array elements moved up to optional depth(method) flat(depth?: 1): array!equivalent to .reduce() + .concat()arr.reduce((acc, val) ⇒ acc.concat(val), [])!equivalent to .concat() + Spread Operator via const flatArr = arr ⇒ [].concat(...arr);References