nick34992
4/12/2017 - 4:09 PM

Rust: For Loop: Enumerate

Rust: For Loop: Enumerate

fn main() {
  for (index, value) in (5..10).enumerate() {
    println!("index = {} and value = {}", index, value);
  }
}