#Difference between 2 arrays
5 messages · Page 1 of 1 (latest)
const difference = Array1.filter(e => !Array2.includes(e))
For this to work, you'd have to know which array is larger btw
If you switch Array1 and array2 around, difference would be an empty array
I mean, I guess you can switch it around for both and then concat the two differences, might be a better way though