I'm writing a script and I need to return all existing arrays with all index, because they are all called by the same function. Is this possible? My script is a shell script, but I'm curious if this is possible with other languages too.
For example:
array=[element[0], element[1]]
array2=[element[0], element[1]]
I want to return all arrays and get each element of each array
function MyFunction(allArray[allIndex])
In bash [allIndex] = [@]
. There is something for arrays?
Sorry if this is stupid, i'm so new in programming..
update:I marked it in other languages because I'm learning to program in multiple languages. I was wondering if it was possible, so If this is not possible in Bash, wanted to know the other. Just that. Sorry if it's wrong.