| Top | Previous | Next |
|
Type Casting / toBoolean |
|
toBoolean(value, [failover]) Tries to convert value to a boolean, according to these rules:
If type casting fails, an error is thrown, unless the failover argument is specified, in which case it will be used.
toBoolean(1) ... returns true.
toBoolean("abc", false) ... returns false |