Removes all elements from an array.
arrayClear(array)
returns boolean
someArray.clear()
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | An array name or variable name |
Uses the arrayClear function to clear the value of an array
someArray = ["Red", "White", "Green", "Blue", "Pink"];
writeOutput(arrayClear(someArray));
Lucee4.5+ To clear the value of an array
someArray = ["Red", "White", "Green", "Blue", "Pink"];
writeOutput(arrayClear(someArray));
CF11+ Uses the member function is the same as running arrayClear.
numberArray = [1,2,3];
writeOutput(numberArray.Clear());