map, set

// set实现数组去重
function dedupe(arr) {
    return Array.from(new Set(arr));
}
原文地址:https://www.cnblogs.com/shanchenba/p/5675838.html