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.
Share via WhatsApp, X, Facebook, LinkedIn or copy link. Open Graph preview enabled.