I have defined a bash associative array without the explicit declare -A command. But I am not sure if it really is the associative array since I read somewhere without the declare -A, the array is treated as indexed array by Bash.
I tried the below code:
players=([tennis]=fedExpress [cricket]=buzz [football]=cr7) echo "${players[tennis]}" the o/p is: cr7 but should be fedExpress
but in geeks for geeks article, they declared an indexed array as follows:
ARRAYNAME=([1]=10 [2]=20 [3]=30) so, w/o the declare -A, is the player's array also treated as an indexed array? or associative array? please clarify this. I am writing an article so I have to be corroborative in what I write.