3.4. Comparison Operators (and Booleans)
Operator
Description
Example
Meaning
Booleans:
// Either with type annotations
var myBool: Bool = false
// Or without type annotations
var yourBool = true // Comparison operators and Booleans...
let a = 10
let b = 12
let isEqual = a == b
print(isEqual)
print(type(of: isEqual))Last updated