Loops/For with a specified step: Difference between revisions

(→‎{{header|Wren}}: Now uses Wren-trait module.)
Line 2,293:
=={{header|Swift}}==
This prints all odd digits:
<lang swift>for iI in 1.stride(from: 1, to: 10, by: 2) {
print(i)
}</lang>
Anonymous user