ArrayClear

Removes all elements from an array.

Returns: boolean

Usage

ArrayClear( array )

Arguments

Argument Description
array
(array, required)

Name of an array

Examples

// Creates an array containing 4 elements with the numbers 1 - 4.
numbers = [ 1, 2, 3, 4 ];
dump( numbers ); // outputs the array containing 1 - 4

// Clears the array leaving an array with 0 elements.
ArrayClear( numbers );
dump( numbers ); // outputs the empty array

See also