参考文章:https://www.jianshu.com/p/2cbe951b2997
function repeatnum(arr){
if((new Set(arr)).size != arr.length){
console.log('repeat');
}
}
var arr1 = [1,2,3,4,5,2,3];
repeatnum(arr1);
repeat
参考文章:https://www.jianshu.com/p/2cbe951b2997
function repeatnum(arr){
if((new Set(arr)).size != arr.length){
console.log('repeat');
}
}
var arr1 = [1,2,3,4,5,2,3];
repeatnum(arr1);
repeat