Loading

摘要: 数组扁平化 const arr = [1, [2, [3, [4, 5]]], 6]; // => [1, 2, 3, 4, 5, 6] /** */ // method 1 : flat(Infinity) const res = arr.flat(Infinity); console.log(r 阅读全文
posted @ 2022-04-12 11:27 shanejix 阅读(48) 评论(0) 推荐(0)