You can create an array with a range like this:
var values = Array(0...100)
This give you an array of [0, ..., 100]
More Related Contents:
- How to turn off array range check [closed]
- Convert Dictionary to Array in swift
- Swift how to sort array of custom objects by property value
- How to check if an element is in an array
- Removing duplicate elements from an array in Swift
- How to sort an array of custom objects by property value in Swift
- How to iterate a loop with index and element in Swift
- How do I concatenate or merge arrays in Swift?
- Pick a random element from an array
- Sort Objects in Array by date
- How do I insert an element at the correct position into a sorted array in Swift?
- Shorthand to test if an object exists in an array for Swift?
- Swift JSONDecode decoding arrays fails if single element decoding fails
- How do I sort a swift array containing instances of NSManagedObject subclass by an attribute value (date)
- Flatten [Any] Array Swift
- How to remove an element from an array in Swift
- Swift: Pass array by reference?
- Is it possible to make an Array extension in Swift that is restricted to one class?
- In Swift, an efficient function that separates an array into 2 arrays based on a predicate
- How do you create an immutable array in Swift?
- Reorder array compared to another array in Swift [duplicate]
- swift: modifying arrays inside dictionaries
- How to stable sort an array in swift?
- New Array from Index Range Swift
- Iterate over two arrays simultaneously
- Why does the reverse() function in the Swift standard library return ReverseRandomAccessCollection?
- Compare 2 arrays and list the differences – Swift
- In Swift how can I sort one array based on another array?
- How to convert UInt8 byte array to string in Swift
- check if all elements of an array have the same value in Swift