return array minus element code example Example: array minus array javascript let difference = arr1.filter(x => !arr2.includes(x));