I've been learning Swift after coding on Android for a while. I was trying to figure out the use of the Open Range operator when used in an Array.
For e.g. Suppose we're working on an Array inside a function:
func operation(_ array:[Int]){
for item in array[1...]{
//1st element from the Array
var currentItem = array[0]
//Do something with the current item
}
}
In the above e.g., does the array[1...] mean; start from the element at index 1 and iterate till the end of the Array? Since the open range operator is supposed to run from 1 to infinity in this case.