Determines whether an array is empty. Equivalent to arrayLen(). Calling this function on an array with 10 undefined elements will return false. CF MX: this function can be used on XML objects.
arrayIsEmpty(array)
returns boolean
someArray.isEmpty()
Name | Type | Required | Default | Description |
---|---|---|---|---|
array | array | Yes | An array name or variable name |
To check an array is empty or not
someArray = [1,2,3,4,5];
writeOutput(arrayIsEmpty(someArray));
Lucee4.5+ To check an array is empty or not
someArray = [1,2,3,4,5];
writeOutput(arrayIsEmpty(someArray));
CF11+ Uses the member function is the same as running arrayIsEmpty.
numberArray = arrayNew(1);
writeOutput(numberArray.isEmpty());
Lucee4.5+ Uses the member function is the same as running arrayIsEmpty.
numberArray = arrayNew(1);
writeOutput(numberArray.isEmpty());