The Javascript BigInt64Array set()
method stores values in the typed array.
BigInt64Array.set(array[, offset]) BigInt64Array.set(BigInt64Array[, offset])
Parameter | Optional | Meaning |
---|---|---|
array | Required | The array from which to copy values. |
BigInt64Array | Required | If the source array to copy |
offset | Optional | The offset into the target array to begin writing values. If you omit this value, 0 is assumed. |
Using set()
var buffer = new ArrayBuffer(8); var uint8 = new BigInt64Array(buffer); uint8.set([1n, 2n, 3n], 3); console.log(uint8); // BigInt64Array [ 0, 0, 0, 1n, 2n, 3n, 0, 0 ]