difference
Calculates the difference between two arrays, without filtering duplicate values.
- Create a
Set
fromb
to get the unique values inb
. - Use
Array.prototype.filter()
ona
to only keep values not contained inb
, usingSet.prototype.has()
.