主题
flattenDeep
js
_.flattenDeep(array)
以递归方式展平 array
。
¥Recursively flattens array
.
新增于
¥Since
3.0.0
参数
¥Arguments
array
(数组):要展平的数组。¥
array
(Array): The array to flatten.
返回
¥Returns
(数组):返回新的扁平化数组。
¥(Array): Returns the new flattened array.
示例
¥Example
js
_.flattenDeep([1, [2, [3, [4]], 5]]);
// => [1, 2, 3, 4, 5]