摘要:
例:1-20的随机数组,找丢失的某几个数function find(arr,count){ var str= arr.toString(); var newarr=[]; for(var i=1;i<=count;i++){ var reg=new RegExp("^"+i+",|,"+i+",|,"+i+"$","g"); if(reg.test(str)) continue; newarr.push(i); } return newarr;}var arr=[11,2,4,7,8,3, 阅读全文