compare two and get the difference arrays typescript 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)));