TrueFalseFormat

Return Yes/No based on whether the input is true/false

Method Signature

TrueFalseFormat(value=[any])

Arguments

Argument
Type
Required
Description
Default

value

any

true

The value to check for true/false and return Yes/No

Examples

Numeric 1 is interpreted as true

Run Example

trueFalseFormat( 1 );

Result: true

Numeric 0 is interpreted as false

Run Example

trueFalseFormat( 0 );

Result: false

String representation of 1 is interpreted as true

Run Example

Result: true

String representation of 0 is interpreted as false

Run Example

Result: false

YES is recognized as synonym for true as well

Run Example

Result: true

And NO as synonym for false

Run Example

Result: false

An empty string results in false again

Run Example

Result: false

Additional Examples

Last updated

Was this helpful?