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