Creates a list.
Syntax
@List(values:...) : any
Parameter |
Description |
values |
One or more parameters of any type. Each parameter
becomes an element in the list. |
Return value |
Description |
any |
The list. |
Examples
This example creates a list with 4
elements.
function p(stuff) {
print("<<<" + stuff + ">>>");
}
var cities = @List("Paris", "Berlin", "London", "Moscow");
for(var i = 1; i <= @Count(cities); i++) {
p(i + " " + @Element(cities, i));
}
/*
<<<1 Paris>>>
<<<2 Berlin>>>
<<<3 London>>>
<<<4 Moscow>>>
*/