题解 | #查找重复元素#
查找重复元素
http://www.nowcoder.com/practice/871a468deecf453589ea261835d6b78b
{"css":"","js":"\nfunction duplicates(arr) {\n return arr.filter(function(item,index,array){\n return array.indexOf(item) !== array.lastIndexOf(item) && array.indexOf(item,0) === index;\n })\n}","html":"","libs":[]}