let arr1 = [12,13,14,12,13,12,34,45] let item = [...new Set(arr1)] console.log(item); 输出结果显而易见成功去除重复的啦!