exists
Modified on Mon, 04 Sep 2023
Description
Use this function to check if a value is present, meaning it is not undefined and not an empty string.
Syntax
exists(value)
Returns
Return Value | Description |
---|---|
Boolean | Returns 'true' if the value is present (not undefined and not an empty string); otherwise, 'false'. |
Sample
Example | Result | Description |
---|---|---|
exists('Hello, World!') | true | Returns 'true' because the value is present and not empty. |
exists('') | false | Returns 'false' because the value is an empty string. |
exists(undefined) | false | Returns 'false' because the value is undefined. |
To view all String Functions, click here.
See Also
Was this article helpful?
That’s Great!
Thank you for your feedback
Sorry! We couldn't be helpful
Thank you for your feedback
Feedback sent
We appreciate your effort and will try to fix the article