For Loops
var myIntegers = [0, 1, 2]
for integer in myIntegers {
print(integer)
}
// 0
// 1
// 2for number in stride(from: 0, to: 0.5, by: 0.1) {
print(number)
}
// 0
// 0.1
// 0.2
// 0.3
// 0.4Behind the Scenes
Protocols With Associated TypesLast updated
Was this helpful?