setintermediateconst src = new Int32Array([1, 2, 3]);
const dest = new Int32Array(5);
dest.set(src, 1);
// dest: [0, 1, 2, 3, 0]set() copies values from another array into the typed array at a given offset.
Use the set() method to copy values from an array into a TypedArray.