Stride

Swift

Swift for loop and While

📌 목차 for in for in where stride forEach 참고 📌 for-in for item in 1...10 { print(item) }📌 for in where for item in 1...10 where item % 2 == 0 { print("even: \(item)") }📌 stride for i in stride(from: 10, through: 2, by: -2) { print(i); // 10 8 6 4 2 }📌 forEach var temp = [1, 2, 3] temp.forEach{ print($0) }📌 참고 Swift 5 Tutorial 2021

eddie0329
'Stride' 태그의 글 목록