04 / 04

Write a polyfill for Array.flat(depth).

The flat(depth) method of Array instances creates a new array with all sub-array elements concatenated into it recursively up to the specified depth.

javascript
Share

Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.