// Create an empty collection bound to this core
cy.collection(): Collection<NodeData, EdgeData>Create an empty collection bound to this core. Use it as an accumulator, for example cy.collection().union(cy.nodes({ selected: true })).
This method takes no arguments. Query with cy.elements(query) or build a collection with union() to include existing elements.
Returns
Collection<NodeData, EdgeData>a collection of zero elements
Throws
if called with any argument — use cy.add() to insert definitions or set operations to build collections