摘要: 数组扁平化 const arr = [1, 2, 3, [4, [5, 6, [7,8]]]]; console.log(arr.flat(Infinity)); // [1, 2, 3, 4, 5, 6, 7, 8] console.log(arr.join().split(',')); // [ 阅读全文
posted @ 2021-03-17 11:36 ltog 阅读(54) 评论(0) 推荐(0) 编辑