I have a function where several values from a multidimensional array are called very often, like array[idx][3].. In order to save space I want to define variables with these values at the beginning of the function like so:
var na = array[idx][1];
var sc = array[idx][2];
...
I thought it would be faster if it was possible to create an array of variable names -> var tmp = ['na','sc',...];, create a for loop and cycle through the array of names and the multidimensional array, i.e.:
for(i = 0; i = 7, i++){
var tmp[i] = array[idx][i];
}
Is it possible?
['na', 'sc'...]in that for-loop.