boolArray

Syntax

  • bool[] boolArray()
  • bool[] boolArray(values)

Parameters

  1. 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.

Examples

boolArray([1, 0, 1, 20])
# result = [true,false,true,true]
boolArray(["true", "1", "0", "f", "false", "schwiizer nati"])
# result = [true,true,false,false,false,true]
boolArray([true, false, true])
# result = [true,false,true]

Was this article helpful?