Length Automatically Updates : Array Length « Array « JavaScript Tutorial






<html>
<head>
<title>Length Automatically Updates</title>

<script language="javascript" type="text/javascript">
<!--

var someArray = new Array();
alert(someArray.length);
someArray[0] = "A";
alert(someArray.length);
someArray[1] = "B";
alert(someArray.length);

//-->
</script>

</head>
<body>

<h1>Length Automatically Updates</h1>

</body>
</html>








11.4.Array Length
11.4.1.Array.length
11.4.2.Get Array length
11.4.3.Remove elements from array by changing the array length
11.4.4.Append element to the end of an Array by reference the Array.length property
11.4.5.Get the last element in an Array
11.4.6.Length Automatically Updates