Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVASCRIPT

js compare 2 arrays for unique values

//compare 2 arrays and return unique value between both
let arr3 = arr1.filter(function(obj){
    return arr2.indexOf(obj) == -1
  })
 
PREVIOUS NEXT
Tagged: #js #compare #arrays #unique #values
ADD COMMENT
Topic
Name
8+2 =