Array Length Automatically Updates in JavaScript

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