0
How can I iterate For loop only one time in Kotlin ?
3 odpowiedzi
+ 3
for (i in 0..0) {} // i is only 0 for one loop
+ 3
Why do you even need a loop when you want to iterate only one time?
+ 2
Yeah
why do you want a loop for 1 iteration. Its not even a loop.