Array.clear Function
Removes all elements from an Array instance. This function is static and is invoked without creating an instance of the object.
Array.clear(array);
Arguments
Term |
Definition |
---|---|
array |
The array to clear. |
Remarks
Use the clear function remove all elements from an Array instance. The resulting array's length property will be zero.
Example
The following example shows how remove all elements from an array by calling the clear function.