The Null Data Type The Null Data Type

The Null Data Type

Zack Cohen Zack Cohen
The Null Airkit type has only one value NULL, it is used to represent the
absence of a value. There is nothing that can be done with NULL except to
check if a value is NULL. The IF statement considers NULL to be false, so
one can very quickly test to determine if a variable is NULL or not. For
example suppose one would like to display a personalized message to a user, the
following Airscript expression will display "Hello {{name}}" to the user if
the name variable is not NULL, and it will display "Hello!" if the name
variable is NULL (meaning the name is unknown).
IF(name, "Hello {{name}}", "Hello!")

 

Was this article helpful?

0 out of 0 found this helpful

Add comment

Article is closed for comments.