_.xor([arrays])

sourcenpm package

Creates an array of unique values that is the symmetric difference of the given arrays. The order of result values is determined by the order they occur in the arrays.

Since

2.4.0

Arguments

  • [arrays] (…Array): The arrays to inspect.

Returns

(Array): Returns the new array of filtered values.

Example

  1. _.xor([2, 1], [2, 3]);
    // => [1, 3]