码迷,mamicode.com
首页 > 编程语言 > 详细

数组判断重复

时间:2017-06-30 21:05:48      阅读:115      评论:0      收藏:0      [点我收藏+]

标签:json   ret   oar   his   mat   name   length   for   test   

testName () {
let arrStr = JSON.stringify(this.proArrName)
for (let i = 0; i < this.proArrName.length; i++) {
if ((arrStr.match(new RegExp(this.proArrName[i], ‘g‘)).length) > 1) {
return true
}
}
return false
}

数组判断重复

标签:json   ret   oar   his   mat   name   length   for   test   

原文地址:http://www.cnblogs.com/songdongdong/p/7100386.html

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!