toBool()
Converts the JavaScript value to a native Boolean value.
Declaration
func toBool() -> BoolReturn Value
The native Boolean value.
Discussion
This method uses JavaScript type coercion to convert the value to a JavaScript Boolean value, then returns the native representation of the result. Thus, this method can return true even when the isBoolean property does not.