xor
Import from @varavel/vdl-plugin-sdk/utils/arrays.
Computes the symmetric difference between two arrays. The symmetric difference is the set of elements which are in either of the arrays, but not in their intersection.
Type Parameters
| Type Parameter | Description |
|---|---|
T |
The type of elements in the array. |
Parameters
| Parameter | Type | Description |
|---|---|---|
arr1 |
readonly T[] |
The first array. |
arr2 |
readonly T[] |
The second array. |
Returns
T[]
An array containing the elements that are present in either arr1 or arr2 but not in both.