Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

compare two arrays and remove duplicates javascript

array1 = array1.filter(function(val) {
  return array2.indexOf(val) == -1;
});
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #compare #arrays #remove #duplicates #javascript
ADD COMMENT
Topic
Name
5+9 =