js-数组去重

function arrQC(arr){
    let temp = [];
    arr.forEach((item,idx)=>{
        if(temp.indexOf(item)<0){
            temp.push(item)
        }
    })
    return temp;
}

 

posted @ 2018-12-20 21:35  面包_girl  阅读(93)  评论(0编辑  收藏  举报
/* 鼠标点击文字特效 */