JavaScript arrays are getting two new methods. `Array.prototype.flat()` returns a new array with all sub-array elements concatenated into it recursively up to the specified depth. The sub-array elements become members of the new array. `Array.prototype.flatMap()` first maps each element using a mapping function, then flattens the result into a new array. This method is functionally equivalent to a map followed by a flatten of depth 1.
Docs: https://v8.dev/features/array-flat-flatmap https://developers.google.com/web/updates/2018/03/smooshgate