Operators
Arithmetic, comparison, logical, range and nil coalescing operators. Integer division truncates.
Example
print(7 / 2, 7 % 2, 7.0 / 2)
print(3 < 5, !(3 < 5))
print(1...3, 1..<3)
print(5 == 5 && 2 != 3)Exercise
Half open range.
13
Quiz Test
These free lessons are for learning. Join a full course for projects, mentor feedback and a verified certificate.