[Javascript] Two Dimensional Arrays

Erwin Kodiat Erwin.Kodiat at mitrais.com
Sun Jun 17 20:26:47 CDT 2001


You have to create a nested array to make a multidimensional array in both
JavaScript and JScript. It is, by default, assigning by reference, which
means if you change the value of array arrChild01 the value of child array
in arrParent will change accordingly.

Examples:

<script language=JavaScript>
var arrParent  = new Array();
var arrChild01 = new Array();
var arrChild02 = new Array();
arrParent[arrParent.length] = arrChild01;
arrParent[arrParent.length] = arrChild02;
alert(arrParent.length);
</script>



Erwin Kodiat
Mitrais Software Development Center
Bali, Indonesia
Tel: +62 361 755025
Fax: +62 361 755024
http://www.mitrais.com 

This transmission is for the intended addressee only and is confidential
information.  If you have received this transmission in error, please delete
it and notify the sender.  The contents of this E-mail are the opinion of
the writer only and are not endorsed by MROnly.com Pte Ltd unless expressly
stated otherwise. 

-----Original Message-----
From: alkemist_111 at Euphorium.net [mailto:alkemist_111 at Euphorium.net]
Sent: Sunday, June 17, 2001 07:20
To: javascript at LaTech.edu
Subject: [Javascript] Two Dimensional Arrays



Hi
How to make a two dimensional Array in JavaScript(JScript).
Sincerely
Urban Avierfjärd
ICQ#69907743
Homepage http://w1.201.telia.com/~u20100003


_______________________________________________
Javascript mailing list
Javascript at LaTech.edu
http://www.LaTech.edu/mailman/listinfo/javascript




More information about the Javascript mailing list