Swift - Range Operators

There are two types of range operators in Swift
  • Closed Range Operator
1...5 represents 1, 2, 3, 4, 5

  • Half-Closed Range Operator
1..<5 represents 1, 2, 3, 4

No comments:

Post a Comment