Question : rust how to access elements of an array
Answered by : john-niemiec
fn main() { let a = [1, 2, 3, 4, 5]; let first = a[0]; let second = a[1];
}
Source : https://doc.rust-lang.org/book/ch03-02-data-types.html | Last Update : Wed, 12 Jan 22