Returns the difference between this and another array if comp is given, filters out all values from an array for which the comparator function does not return true
comp
diff([1, 2, 3], [1, 2, 4]); // [3]
diff([1, 1.2, 1.5, 3, 0], [1.9, 3, 0], (a, b) => Math.round(a) === Math.round(b)); // [1, 1.2]
Optional
Generated using TypeDoc
Returns the difference between this and another array if
comp
is given, filters out all values from an array for which the comparator function does not return trueExample
Example