So, if buf-array null so array-pointer "undefined".
buf=new array(value) --> define a pointer of array with length value
without init buf have no data type (after first set to value).
object buf = null; --> data type "object" ? like buf = new Object() ?
IE object number
An object representation of the number data type and placeholder for numeric constants.
numObj = new Number(value)
Required. The variable name to which the Number object is assigned.
Required. The numeric value of the Number object being created.
JScript creates Number objects as required from numerical values. It is rarely necessary to create Number objects explicitly.
The primary purposes for the Number object are to collect its properties into one object, and to allow numbers to be converted into strings via the toString method.
MAX_VALUE Property | MIN_VALUE Property | NaN Property | NEGATIVE_INFINITY Property | POSITIVE_INFINITY Property | constructor Property | prototype Property
toLocaleString Method | toString Method | valueOf Method
IE Object Array
Provides support for creation of arrays of any data type.
arrayObj = new Array()
arrayObj = new Array([size])
arrayObj = new Array([element0[, element1[, ...[, elementN]]]])
Required. The variable name to which the Array object is assigned.
Optional. The size of the array. As arrays are zero-based, created elements will have indexes from zero to size -1.
Optional. The elements to place in the array. This creates an array with n + 1 elements, and a length of n + 1. Using this syntax, you must supply more than one element.
After an array is created, the individual elements of the array can be accessed using [ ] notation, for example:
var my_array = new Array();
for (i = 0; i < 10; i++)
my_array[i] = i;
x = my_array;
Since arrays in Microsoft JScript are zero-based, the last statement in the preceding example accesses the fifth element of the array. That element contains the value 4.
If only one argument is passed to the Array constructor, and the argument is a number, it must be an unsigned 32-bit integer (< approximately four billion). That value then becomes the size of the array. If the value is a number, but is less than zero or is not an integer, a run-time error occurs.
If a single value is passed to the Array constructor, and it is not a number, the length property is set to 1, and the value of the only element becomes the single, passed-in argument.
Notice that JScript arrays are sparse arrays, that is, although you can allocate an array with many elements, only the elements that actually contain data exist. This reduces the amount of memory used by the array.