Join Slack
Powered by
how the for loop in kotlin works? why don't we nee...
# getting-started
m
mohita
07/20/2017, 9:07 AM
how the for loop in kotlin works? why don't we need to initialize the variable x that iterates in for loop?
n
nkiesel
07/20/2017, 8:18 PM
can you give a concrete example that puzzles you? Typical usage would be
for (x in 1..10) println(x)
m
mohita
07/21/2017, 9:44 AM
Yeah. I sorted it out.Just one doubt remaining,if i wanna iterate the for loop not from the beginning,but from say position 5.So how can i do that?
10
Views
Open in Slack
Previous
Next