Swift for loop and for index element in an array iOS
Solution:
The below code is used for looping with index and value from one array.
arr is an array with set of values
i - index
value - data at particular index
The below code is used for looping with index and value from one array.
arr is an array with set of values
i - index
value - data at particular index
var arr = NSMutableArray()
for (i,value) in arr.enumerated(){
print("index value =",i)
print("data value =",value)
}
Comments
Post a Comment