摘要: 例: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, 阅读全文
posted @ 2013-09-05 18:08 CatherineGao 阅读(220) 评论(0) 推荐(0) 编辑