Array iterate on elements
fn main() { let numbers: [i32; 3] = [10, 11, 12]; for num in numbers { println!("{}", num); } }
10
11
12
Press ← or → to navigate between chapters
Press S or / to search in the book
Press ? to show this help
Press Esc to hide this help
fn main() { let numbers: [i32; 3] = [10, 11, 12]; for num in numbers { println!("{}", num); } }
10
11
12