Javascript BigUint64Array set()

Introduction

The Javascript BigUint64Array set() method stores values in the typed array.

BigUint64Array.set(array[, offset])
BigUint64Array.set(BigUint64Array[, offset])
Parameter Optional Meaning
arrayRequired The array from which to copy values.
BigUint64Array 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 BigUint64Array(buffer);

uint8.set([12n, 5n, 8n, 130n, 44n], 3);

console.log(uint8); // BigUint64Array [ 0, 0, 0, 12n, 5n, 8n, 130n, 44n, 0, 0 ]



PreviousNext

Related