Answers for "find unique elements between two array in js"

0

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
  })
Posted by: Guest on January-26-2022
0

function to find the unique elements from two arrays

var array3 = array1.filter(function(obj) { return array2.indexOf(obj) == -1; });
Posted by: Guest on June-21-2021

Code answers related to "find unique elements between two array in js"

Code answers related to "TypeScript"

Browse Popular Code Answers by Language