Answers for "how to compare two arrays of index javascript"

2

es6 compare two arrays

let difference = arrA.filter(x => !arrB.includes(x));
Posted by: Guest on September-24-2020
2

diff two arrays javascript

function diffArray(arr1, arr2) {
  return arr1
    .concat(arr2)
    .filter(item => !arr1.includes(item) || !arr2.includes(item));
}
Posted by: Guest on August-13-2020

Code answers related to "how to compare two arrays of index javascript"

Code answers related to "Javascript"

Browse Popular Code Answers by Language