Skip to content

eles.size()

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

eles.size — Collection › Iteration and aggregation

Preview · Collection › Iteration and aggregation

Read in the complete API reference · All API members

// The number of elements — the method form of length
eles.size(): number

The number of elements — the method form of length.

Returns number

the element count

Example

console.log(eles.size()); // 5

Example graph and handle setup