📌  相关文章
📜  删除重复的字符串数组Javascript代码示例

📅  最后修改于: 2022-03-11 15:01:27.336000             🧑  作者: Mango

代码示例4
const arr = [1, 2, [3, 4]];

// To flat single level array
arr.flat();
// is equivalent to
arr.reduce((acc, val) => acc.concat(val), []);
// [1, 2, 3, 4]

// or with decomposition syntax
const flattened = arr => [].concat(...arr);