I want to traverse an array with a stride. For example, I have an array [0,1,2,3,4,5,6,7,8,9]
.And I want to traverse this array with a stride of 3
. The oc
code likes below:
for (int i = 0; i < array.count; i += 3) {
}
How can I do that with swift
.