es6多维数组扁平化

let arr = [1,[2],[3,[4]]] 
arr.flat(Infinity)
posted @ 2021-11-16 17:15  刘旭飞  阅读(230)  评论(0)    收藏  举报