@Elements (JavaScript)
Returns the number of entries in a list.
Defined in
@Functions (JavaScript)Syntax
@Elements(list:any) : int
Parameter | Description |
---|---|
list |
The list to be checked. |
Return value | Description |
---|---|
int |
Number of entries in the list. |
Usage
A list is an array.Examples
This example iterates through a list.function p(stuff) {
print("<<<" + stuff + ">>>");
}
var citiesArray = new Array("Paris", "Berlin", "London", "Moscow");
for(var i = 1; i <= @Elements(citiesArray); i++) {
p(@Element(citiesArray, i));
}