摘要:
代码如下: /*var arr = [1,2,3,4,3,5,7,3,7,5,2];*/// 去掉数组中重复的元素个数/* var hash = []; for(var i=0;i<arr.length;i++){// HASH 空的 arr[i] if(hash[arr[i]] undefined 阅读全文
posted @ 2017-06-20 16:20
辰峰
阅读(253)
评论(0)
推荐(0)
摘要:
代码如下: */// 2// 红球 [球1,球2]// //Math.random()://console.log(parseInt(Math.random()*2));//0~1/*console.log(Math.floor(0.666));//0console.log(Math.ceil(0. 阅读全文
posted @ 2017-06-20 16:19
辰峰
阅读(404)
评论(0)
推荐(0)
摘要:
代码如下: /*正则表达式*/// 替换// 替换敏感词// var str ="纪委负责全国党员干部的纪检和纪检监察工作,";// 纪委 **// 纪检 **// 纪检监察 ****// 第一个字纪// 第二个字委或检 如果是检 /* var str="强调,当前各级党组织和党员、干部贯彻执行党的 阅读全文
posted @ 2017-06-20 16:16
辰峰
阅读(294)
评论(0)
推荐(0)