Swift遍历数组的三种方式

1.

for index  in 0..

{    

}

2.

for item in array

{

}

3.

for (index, item) in enumerate(array)

{

}

你可能感兴趣的:(Swift)