I have created and filled a bunch of arrays using an ASP loop. The arrays were created looking like this
var amount1 = new Array(250, 0)
var amount2 = new Array(500, 0)
var amount3 = new Array(0, 250)
...and so on
So, I want to call a specific array, based on a variable passed into the function (intSel). This variable will be used to select the correct array by providing the number after "amount". How do I concatenate this thing to return the values contained in the array itself, instead of just a string.
Right now I have a line that says:
document.getElementById('Debit0').value = "amount" + intSel + "";
But of course that doesn't work and returns "amount2", for example.
I want it to return 500.
Thanks for your help!