array.append()

edit

Appends an array element to an array.

array.append( value=any, merge=boolean )

Returns: Array

Argument Description
value
any, required
edit

The element to append. Can be any type.

Alias: object, obj

merge
boolean, optional
edit

This argument only applies when the value is an array.

If set to true appends array elements individually to the source array.

If false (default) the complete array is added as one element at the end, in the source array.

Examples

edit
	myarray = ["one","two","three","four","five"];
	writeDump(myarray);
	res = myarray.Append("six");
	writeDump(res);

See also