Function xor

  • 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.

    Type Parameters

    • T

    Parameters

    • Rest ...arrays: T[][]

      [] The arrays to inspect.

      Rest

    Returns T[]

    Array Returns the new array of filtered values.

    Since

    5.7.0

    See

    [[difference]],[[union]],[[unionBy]],[[unionWith]],[[without]],[[xorBy]],[[xorWith]]

    Example

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