Swift supports several types of operators. One of them is Half Open Range operator. The half open range operator specifies a range between two values a and b (a<b) where b is not included. It is known as half open range operator because it contains its first value only not the final value.
In Swift, the half-open range operator is “..<“. This operator is used to create a range that includes the starting value but excludes the ending value. For example:
let range = 1..<5
This range represents the numbers 1, 2, 3, and 4, but does not include 5.