isEmpty
Table of Contents
Overview
The isEmpty function checks if a collection is empty or not. It returns true if it is empty. Otherwise, it returns false.
Return Type
- BOOLEAN
Syntax
<variable> = <collectionVariable>.isEmpty();
where,
| Parameter | Data type | Description |
| <variable> | BOOLEAN | Variable which will hold the returned value. |
| <collectionVariable> | COLLECTION | The variable which will be checked if it is empty or not. |
Examples
productVersion = collection("Creator":5, "CRM":2, "Mail":5); info productVersion.isEmpty(); // returns false product = collection(); info product.isEmpty(); // returns true