I would like to be able to reference an array by using a string, as such:
var arrayName = "people";
var people = [
'image47.jpeg',
'image48.jpeg',
'image49.jpeg',
'image50.jpeg',
'image52.jpeg',
'image53.jpeg',
'image54.jpeg',
'image55.jpeg',
]
function myFunc (arrayName)
{
//arrayName is actually just a string that evaluates to "people", which then in turn would reference the var people, which is passed in.
}
Any thoughts on how to do this? Sorry if I'm missing something obvious.
var arrayName[] = people[];and this needs to come after var people [ ].