let arr = [1, 2, [99, 100], 3, 4, [1, 2, { name: 'hkq' }, [[1, 2, 3], 2]], 5, 6, 7, 8]
let c = arr.flat(Infinity) // Infinity 表示展开任意胜读的嵌套数组 可以是 0, 1, 2, 3 等等
console.log('c: ', c)
标签:flat,arr,Infinity,扁平化,let,数组,简单 From: https://www.cnblogs.com/mysn/p/16827259.html