去除数组重复数据

506 阅读1分钟
let arr = [3, 5, 2, 2, 5, 5];
let unique = [...new Set(arr)];

去除字符串的重复字符

[...new Set('ababbc')].join('')