ArrayNew()
create a new array. Shorthand syntax is [].
ArrayNew( dimension=number, type=string, synchronized=boolean );
Returns: Array
Examples
create a new array, set the dimension
a = arrayNew(1);
// Implicit array notation
a.append([]);
// with values
a.append( [
'a','b',
3, 4,
[],
{complex: true},
queryNew("id,date")
] );
dump(a);
See also
- Arrays
- StructNew()
- Array
- Search Issue Tracker
- Search Lucee Test Cases (good for further, detailed examples)