Check out example codes for "for loops in rust". It will help you in understanding the concepts better.

Code Example 1

for x in 0..10 {
    println!("{}", x); // x: i32
}

//abstract:
for var in expression {
    code
}

Learn ReactJs, React Native from akashmittal.com