Syntax
- bool[] boolArray()
- bool[] boolArray(values)
Parameters
- values—( float[], bool[], string[] )Values to convert
Returns
If values is not given, an empty bool array is returned.
If values is given, a bool array is returned that contains the elements of values converted to the corresponding bool values.
Related
Examples
example.1
boolArray([1, 0, 1, 20])
# result = [true,false,true,true]
example.2
boolArray(["true", "1", "0", "f", "false", "schwiizer nati"])
# result = [true,true,false,false,false,true]
example.3
boolArray([true, false, true])
# result = [true,false,true]