// The elements in exactly one of the two collections
eles.symmetricDifference<OtherData = Data>(other: Collection<NodeData, EdgeData, OtherData>): Collection<NodeData, EdgeData, Data | OtherData>The elements in exactly one of the two collections.
| Name | Description |
|---|---|
other: Collection<NodeData, EdgeData, OtherData> | the other collection |
Returns
Collection<NodeData, EdgeData, Data | OtherData>a new collection
Example
const other = cy.getElementById('b');console.log(cy.getElementById('a').symmetricDifference(other).map(ele => ele.id())); // ["a","b"]Also spelled eles.symdiff, eles.xor.