Answers for "how to compare elements of two arrays in javascript and return different value"

0

compare two arrays and return the difference javascript

let difference = arr1
                 .filter(x => !arr2.includes(x))
                 .concat(arr2.filter(x => !arr1.includes(x)));
Posted by: Guest on March-09-2021

Code answers related to "how to compare elements of two arrays in javascript and return different value"

Code answers related to "Javascript"

Browse Popular Code Answers by Language