Assume we have two JavaScript arrays, alfa and bravo. We need to determine which items appear in alfa, but not in bravo.

We can achieve this by combining the Array.prototype.filter method with the Array.prototype.includes method.

const alfa = ['a', 'b', 'c']
const bravo = ['b', 'c', 'd']

// ['a']
const charlie = alfa.filter(item => !bravo.includes(item))