githubEdit

BooleanFormat

Returns the value formatted as a boolean string

Method Signature

BooleanFormat(value=[any])

Arguments

Argument
Type
Required
Description
Default

value

any

true

The value to cast as a boolean and return the string value

Examples

1 is definitely true

Run Examplearrow-up-right

booleanFormat( 1 );

Result: true

0 is definitely false

Run Examplearrow-up-right

booleanFormat( 0 );

Result: false

Negative -1 is true as well

Run Examplearrow-up-right

Result: true

And even a number larger then 1 is true

Run Examplearrow-up-right

Result: true

Additional Examples

Run Examplearrow-up-right

Last updated

Was this helpful?