I have a function that produces two 2d arrays; how do I return both of them?
I can return two 1d arrays
function test() {
do some stuff and get
arr1 =["A',"B","C"]
do some other stuff and get
arr2 =["X","Y","Z"]
return [arr1,arr2]
}
test[0]= arr1
test[1]=arr2
But if I have
function test() {
do some stuff and get
ary1 =[
["A',"B","C"],
["M',"N","O"]
]
do some other stuff and get
ary2 =[
["X","Y","Z"],
["M',"N","O"]
]
return [ary1,ary2]
}
and I get
test[0] =["A',"B","C"]
test[1] =["X","Y","Z"]
Expected result:
test[0] =[
["A',"B","C"],
["M',"N","O"]
]
test[1] =[
["X","Y","Z"],
["M',"N","O"]
]
how do I return ary1 and ary2?
ary1andary2of your 2nd script are used, what are your expected values?