downTo function

suggest change

if you want to iterate over numbers in reverse order? It’s simple. You can use the downTo() function defined in the standard library

for (i in 4 downTo 1) print(i) // prints "4321"

Feedback about page:

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



Table Of Contents