Array of strings - access element by index



examples/arrays/strings/src/main.rs
fn main() {
    let mut animals = ["cat", "snake", "fish"];
    println!("{animals:?}");

    println!("{}", animals[1]);
    animals[1] = "crab";

    println!("{animals:?}");
}

["cat", "snake", "fish"]
snake
["cat", "crab", "fish"]