ArrayNew

create a new array. shorthand syntax is [].

ArrayNew( [ dimension [, synchronized ] ] )

Returns: Array

Argument Description Default
dimension
number, optional

Number of dimensions in new array: 1, 2, or 3

1

synchronized
boolean, optional

is the array synchronized or not (aka thread safe)

true

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