<body>
<script>
var m0 = [0, 1, 2, 3, 4];
var m1 = [5, 6, 7, 8, 9];
var m2 = [10, 11, 12, 13, 14];
var m3 = [15, 16, 17, 18, 19];
var myArray = [m0, m1, m2, m3];
for (var i = 0; i < myArray.length; i++) {
for (var j = 0; j < ("m"+i).length; j++) {
document.writeln(myArray[i][j]);
}
}
</script>
</body>
</html>
This code only give me the first 2 elements in each array.
But, I would like to get all the elements in all the arrays.
tks
01-17-2013, 08:27 PM
Logic Ali
Users do not appreciate simultaneous cross-posting of Mickey Mouse questions like this into every forum you can find. Had you put the search engine to proper use, you could have found plenty of answers without asking.