📌  相关文章
📜  删除重复字符串 javascript 代码示例

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

代码示例6
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);