1、ES6判断数组是否存在重复元素 let arr = [1, 2, 3, 4, 5, 2, 3]; if ((new Set(arr)).size != arr.length) { console.log('数组有重复值'
let userInfoLS=[ {id:1,name:'aaa'}, {id:2,name:'bbb'}, {id:3,name:'ccc'}, {id:2,name:'ddd