An Array within an Array
<HTML>
<HEAD>
<TITLE>Arrays within Arrays</TITLE>
</HEAD>
<BODY>
<H1 ALIGN="CENTER">Arrays within Arrays</H1>
<SCRIPT LANGUAGE="JavaScript"><!--
junk = new Array("s1",'s2',4,3.5,true,false,null,new Array(5,6,7))
document.write("junk[0] = "+junk[0]+"<BR>")
document.write("junk[1] = "+junk[1]+"<BR>")
document.write("junk[2] = "+junk[2]+"<BR>")
document.write("junk[3] = "+junk[3]+"<BR>")
document.write("junk[4] = "+junk[4]+"<BR>")
document.write("junk[5] = "+junk[5]+"<BR>")
document.write("junk[6] = "+junk[6]+"<BR>")
document.write("junk[7][0] = "+junk[7][0]+"<BR>")
document.write("junk[7][1] = "+junk[7][1]+"<BR>")
document.write("junk[7][2] = "+junk[7][2])
// --></SCRIPT>
</BODY>
</HTML>
Related examples in the same category