isBoolean
Returns true when a value can be converted to Boolean
isBoolean(value) → returns boolean
Argument Reference
value any Required
Examples Sample code invoking the isBoolean function
Yes is considered a boolean that is true
isBoolean("yes") Expected Result: YES
No is considered a boolean that is false
isBoolean("no") Expected Result: YES
Maybe is not considered a boolean
isBoolean("maybe") Expected Result: NO
true is a boolean
isBoolean(true) Expected Result: YES
false is a boolean
isBoolean(false) Expected Result: YES
0 is considered a boolean that is false
isBoolean(0) Expected Result: YES
23 is considered a boolean that is true
isBoolean(23) Expected Result: YES
© 2012–present Foundeo, Inc. and the CFDocs contributors.
Licensed under the MIT License.
ColdFusion is a trademark of Adobe Systems Incorporated.
https://cfdocs.org/isboolean