step function

suggest change

Is it possible to iterate over numbers with arbitrary step, not equal to 1? Sure, the step() function will help you

for (i in 1..4 step 2) print(i) // prints "13"
for (i in 4 downTo 1 step 2) print(i) // prints "42"

Feedback about page:

Feedback:
Optional: your email if you want me to get back to you:



Table Of Contents