Lets say I have two arrays as follows:
const A = ['Mo', 'Tu', 'We', 'Thu', 'Fr']
const B = ['Mo', 'Mo', 'Mo', 'Tu', 'Thu', 'Fr', 'Sa']
I want to subtract array A from array B. With the result looking like this:
const result = ['Mo', 'Mo', 'Sa']
How can this be achieved? It seems so simple but I cannot get it working.
Essentially this should remove everything from B once that is in A.