JS Built-ins
TypedArrayInt16Arrayintermediate

Create Int16Array from Another TypedArray

πŸ“– Usage Example
const original = new Int16Array([1, 2, 3]);
const copy = new Int16Array(original);
// copy: Int16Array [1, 2, 3]

Pass another TypedArray to copy its values into a new typed array.

Create an Int16Array by copying values from an existing Int32Array.

πŸ’‘ Hints (2)
  • β€’ Use new Int16Array(typedArray)
  • β€’ Values are copied and converted