SOURCE

function delDulplicate(array){
    let map = {};
    return array.filter(function(e){
        return map[e]?false:map[e]=true;
    });
}

const a = [1,2,34,1,5,3,2];
console.info(delDulplicate(a));
console 命令行工具 X clear

                    
>
console