Skip to content

eles.empty()

eles.empty — Collection > Iteration and aggregation. Cytoscape.js signatures, parameters and return contract.

eles.empty — Collection › Iteration and aggregation

Preview · Collection › Iteration and aggregation

Read in the complete API reference · All API members

// Whether the collection holds no elements
eles.empty(): boolean

Whether the collection holds no elements.

Returns boolean

true when empty

Example

console.log(eles.empty()); // false

Example graph and handle setup