A BigInt64Array object describes an array-like view of an underlying binary data buffer.
The constructors are listed as follows:
new BigInt64Array(); new BigInt64Array(length); new BigInt64Array(typedArray); new BigInt64Array(object); new BigInt64Array(buffer [, byteOffset [, length]]);
Parameter | Optional | Meaning |
---|---|---|
length | Required | an internal array buffer is created of size length multiplied by BYTES_PER_ELEMENT bytes. |
typedArray | Required | the typedArray is copied into a new typed array. |
object | Required | use the BigInt64Array.from() method. |
buffer | Required | create from buffer |
byteOffset | optional | offset to start |
length | optional | length to copy |
Property access
You can reference elements in the array using standard array index syntax.
var int16 = new BigInt64Array(2); int16[0] = 42;//from www . ja va2 s .c o m console.log(int16[0]); // 42
Type | Value Range | Size in bytes | Description | Equivalent C type |
---|---|---|---|---|
BigInt64Array | -2^63 to 2^63-1 | 8 | 64-bit two's complement signed integer | int64_t (signed long long) |