Answers for "how to remove similar items from an array in javascript"

5

javascript to remove duplicates from an array

uniqueArray = a.filter(function(item, pos) {
    return a.indexOf(item) == pos; 
})
Posted by: Guest on October-22-2020
1

javascript to remove duplicates from an array

uniqueArray = a.filter(function(item, pos) {
    return a.indexOf(item) == pos;
})
Posted by: Guest on October-22-2020

Code answers related to "how to remove similar items from an array in javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language