2022_10学习笔记
.flat将会返回一个包含将数组与子数组中所有元素的新数组。
12345678910111213141516var arr1 = [1, 2, [3, 4]];arr1.flat();// [1, 2, 3, 4]var arr2 = [1, 2, [3, 4, [5, 6]]];arr2.flat();// [1, 2, 3, 4, [5, 6]]var arr3 = [1, 2, [3,...
阅读全文…