Gets the number of elements.
Namespace: MindFusion.Common.Collections
File: IEnumerable.js
JavaScript Copy Code |
---|
function count () |
Number. The number of elements.
The following code checks if the count of items in a TreeNode is greater than 10:
JavaScript Copy Code |
---|
// create a tree node that will be a root in our hierarchy var span = new ui.TreeNode("span"); var elements = [span, div, p]; if (root.items.count() > 10) |