I have a function that receives an array of Strings. These are the names of variables I'm supposed to concat together.
Something like:
function createArray(varNames){
varNames.each( function(varName){
someArray = someArray.concat(varName.items);
});
}
createArray(["array1", "array2"]);
I don't know how to take a string and select the variable named after it. Any way of doing this in Javascript?