[[1,2,3],[[1,2],[2,3]]].flat(num)
//num可以写数字,也可以写Infinity (无穷大),数字代表降维几层,Infinity 则表示全部

  

posted on 2023-04-03 16:50  盐孩儿  阅读(35)  评论(0)    收藏  举报