Empty test
Learn how to check if a value is empty.
This test checks whether a value is empty.
An operand is considered empty if it is null, an empty string, or a collection with no elements. Anything else is considered not empty.
Syntax
This test has the following syntax:
/*<value>*/ is empty
To negate the test, use the following syntax:
/*<value>*/ is not empty
Parameters
These are the supported parameters:
- valueany
The value to validate.
Examples
Here is an example of how to check if a string is empty:
"Hello, world!" is empty // false
And this is how you can check if a collection is empty:
[] is empty // true