Last updated on March 9, 2023
ForEach
ForEach is just a loop that will loop through each value performing the same behavior asĀ for
.
let numbers = [1,2,3,4,5,6,7,8,9,10]
numbers.forEach { (element) in
print(element * 10) // 10, 20, 30, 40, 50, 60, 70, 80...
}
Comments are closed.