Associative Arrays
declare -A name creates an associative array — a key-value map, rather than the plain index-to-value array from the previous lesson. Keys and values are both plain strings, assigned with name[key]=value and read with ${name[key]}.
declare -A ages
ages[alice]=30
ages[bob]=25
echo "${ages[alice]}"
echo "${ages[bob]}"30 25
Associative arrays needed Bash 4.0 to exist at all — confirmed working here on this site's Bash 5.0 runtime. Note that iterating over every key (with "${!ages[@]}") doesn't guarantee any particular order, since it's backed by a hash table rather than a list — looking up a specific key directly, as above, is always reliable.
Next: functions — defining one, passing arguments, and the two very different ways a function can give you something back.
Practice exercise
Create an associative array capitals with capitals[france]=Paris and capitals[japan]=Tokyo, then print the value for japan.