Js/Ts入木三分 实现js数组扁平化(数组降维:多维变为一维)的5种方法 Method 1:手写递归 1234567891011121314151617function flatten(arr) { const result = []; arr.forEach((i) => ...