Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

completely remove duplicate element from the array

var array = [1, 2, 3, 4, 4, 5, 5],
    result = array.filter(function (v, _, a) {
        return a.indexOf(v) === a.lastIndexOf(v);
    });

console.log(result); // [1, 2, 3]
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #completely #remove #duplicate #element #array
ADD COMMENT
Topic
Name
2+7 =