Dear All
I am having great difficulty in understanding multi-dimensonal arrays.
I would expect the code below to return 3 alerts showing message1,
message2, and message3 but all I got was message3 three times! If you
have a solution, please shout.
Many thanks...
<script language="javascript">
myarray = new Array();
myarray[1]= new Array(2);
myarray[2]= new Array(2);
myarray[3]= new Array(2);
myarray[1,0] = "message1";
myarray[2,0] = "message2";
myarray[3,0] = "message3";
alert("array1="+myarray[1,0]);
alert("array2="+myarray[2,0]);
alert("array3="+myarray[3,0]);
</script>