摘要:
var pattern1 = /好/g;console.log(pattern1.test("你好"));字符串查找:var pattern1 = /\w/;console.log(pattern1.test("njkhjkjk"));空格查找:var pattern1 = /\s/;console... 阅读全文
摘要:
var c=[2,4,3,5,2,2,2], a = {}, i = 0; for(;i<c.length;i++){ a[c[i]] = 1 //利用对象名称不能重复的特性来去重 } c=[]; for(var g in a){ c.push(g-0); } conso... 阅读全文