Skip to content

eles.anySame(other)

eles.anySame — Collection > Comparison. Cytoscape.js signatures, parameters and return contract.

eles.anySame — Collection › Comparison

Preview · Collection › Comparison

Read in the complete API reference · All API members

// Whether the two collections share at least one element
eles.anySame(other: Collection): boolean

Whether the two collections share at least one element.

Parameters
NameDescription
other: Collection

the collection to compare against

Returns boolean

true when the sets intersect

Example

const other = cy.getElementById('b');
console.log(cy.getElementById('a').anySame(other)); // false

Example graph and handle setup