valueExistsNotEmpty(value)
JavaScript API Reference/Common Functions
valueExistsNotEmpty(value)
Check whether specified value is defined, is not null, and is not an empty
string. Returns
true
if the value exists and is not empty,
false
if it does not.
Parameters:
-
value
(any JS variable): value to check.
Example:
Execute code block only if the function parameter is defined and is not empty.
function saveReservation(notifyUserId) {
if (valueExistsNotEmpty(notifyUserId) {
// send notification to that user
}
}