Whatever message this page gives is out now! Go check it out!

ArrayClear

Last update:
May 18, 2026

Description

Deletes the data in an array.

Returns

An empty array.

Syntax

ArrayClear(array)

Parameters

ParameterDescription
array
Name of an array

History

ColdFusion (2018 release): Returns an empty array.
ColdFusion MX: Changed behavior: This function can be used on XML objects.

Category

See also

Example

<cfscript>
       myArray=[1,2,3,4,5];
       // Clear myArray
       WriteOutput(ArrayClear(myArray)); // Clears the array and returns True
       WriteDump(myArray); // Returns an empty array
</cfscript>

Output

YES

Share this page

Was this page helpful?
We're glad. Tell us how this page helped.
We're sorry. Can you tell us what didn't work for you?
Thank you for your feedback. Your response will help improve this page.

On this page