Extending the Length of an Array : Array « Language Basics « JavaScript DHTML
- JavaScript DHTML
- Language Basics
- Array
Extending the Length of an Array
<HTML>
<HEAD>
<TITLE>Extending Arrays</TITLE>
</HEAD>
<BODY>
<H1 ALIGN="CENTER">Extending Arrays</H1>
<SCRIPT LANGUAGE="JavaScript"><!--
order = new Array()
document.write("order.length = "+order.length+"<BR>")
order[99] = "W99"
document.write("order.length = "+order.length+"<BR>")
order[999] = "D999"
document.write("order.length = "+order.length+"<BR>")
// --></SCRIPT>
</BODY>
</HTML>
Related examples in the same category