var a1 = new Array();
var a2 = new Array();
function x() {
for(var i = 1; i<=2; i++) {
var number = document.getElementById("number" + [i]);
a[i].push(number.value);
}
}
a[i].push(number.value);
is what I want to do but it doesn't work. It would be best if wouldn't have to change the entire code I'm working on, but any solutions will be much appericiated. Thanks in advance!