The
range operator
(..) can be used to create a range. A range includes all the values from the value on the left of the operator to the value of the right. E.g. 1..5 includes 1,2,3,4 and 5. Ranges can also be a sequence of characters.
if (level in 1..4) { // equivalent of i >= 1 && i <= 4
print(i)
}