so I find myself in the awkward situation where I have a function in main.js which requires an array that's populated in second.js...
Simply put, the function in main.js is intended to be reusable:
function chug()
{
p1.innerHTML = st_a[0];
p2.innerHTML = st_a[1];
...
}
Now, 'st_a' is supposed to be resolved as: st_ + , in this case that variable is 'a'. The idea being the second.js file will have multiple arrays (st_a, st_b, etc.) and depending on the need, the relevant array will be used to populate the paragraph elements (p1, p2, etc.)
Any ideas?