[Solved]Using multiple arrays in one statement?

Hello. I have two arrays(firstArray & secondArray), and what I want to do is go through all of the variables inside them through a for loop function, with the help of another array(arrayIndex), just to preserve the code size.

var arrayIndex = new Array("firstArray","secondArray");
var firstArray = new Array("f0","f1","f2","f3");
var secondArray = new Array("s0","s1","s2","s3");

for(var x = 0; x <= arrayIndex.length;x++) {
    for(var i = 0; i <= 3;i++) {
    Debug.Log((arrayIndex[x]).*); //★ this doesn't work the way I need*

}
}
Can anyone point me out the way to make (★) work? And is this the right way of doing it, or should I just use a different dimension Array for this? If you could give me an example, that would be great. Thanks in advance.

I think I understand what you are trying to do. It would be easier to use a javascript object to hold your two arrays.
Like this:

var arrays = 
{
  "first" : [ "f0", "f1", etc... ],
  "second" : [ "s0", "s1", etc... ]
}

Then you can access your arrays like this:

var valueFromFirst = arrays.first[2];
var valueFromSecond = arrays.second[0];