Array

Creates a new array populated with any arguments that have been passed to the function. We recommend using inline array notation over this method, e.g.anArray = [ 1, 2, 3 ].

Returns: array

Usage

Array( )

Arguments

This function takes zero or more dynamic arguments. See examples for details.

Examples

// create a new array with 4 prepoulated elements:
things = Array( 1, "two", { three="four" }, [ 5, 6, 7 ] );
dump(things);

// however, we recommend using the following equivalent syntax:
things = [ 1, "two", { three="four" }, [ 5, 6, 7 ] ];
dump(things);

See also