Boolean Type
The Boolean type is denoted by Bool and is used to represent logical true and false values.
Boolean Literals
The Boolean type has only two literals: true and false.
The following example demonstrates the use of Boolean literals:
cangjie
let a: Bool = true
let b: Bool = falseSupported Operations for Boolean Type
Boolean types support the following operators: logical operators (logical NOT !, logical AND &&, logical OR ||), partial relational operators (== and !=), and partial compound assignment operators (&&= and ||=).