javascript compare to arrays have different values code example
Example: compare two arrays and return the difference javascript
let difference = arr1
.filter(x => !arr2.includes(x))
.concat(arr2.filter(x => !arr1.includes(x)));