Returns a new array with elements from the first array that are not present in the second array.
The type of array elements.
The source array.
The values to exclude.
A new array excluding the specified values.
difference([1, 2, 3, 4], [2, 4]); // [1, 3] Copy
difference([1, 2, 3, 4], [2, 4]); // [1, 3]
Returns a new array with elements from the first array that are not present in the second array.