flat
Flatten an array of arrays into a single dimension
77 bytes
Usage
Given an array that contains many arrays, return a new array where all items from the children are present at the top level.
Note, _.flat
is not recursive and will not flatten children of children of children … of children. It will only flatten T[][]
an array of arrays.