Home >Web Front-end >JS Tutorial >js sample code for processing repeated elements in array_javascript skills

js sample code for processing repeated elements in array_javascript skills

WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWB
WBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOYWBOriginal
2016-05-16 17:06:41947browse
复制代码 代码如下:

function doSz{

var kzly==["a","a","c","a","b"];

for(var i=0;ivar targetNode = kzly[i];
for (var j=0; jif(targetNode == kzly[j]){
kzly.splice(i,1);
kzlymc.splice(i,1);
//alert(arr);
break;
}
}
}

}
Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn