Skip to main content
Version: 1.3.0

Uint16Array

The Uint16Array() typed array constructor creates an array of 16-bit unsigned integers in the platform byte order.

Syntax

new Uint16Array()
new Uint16Array(length)
new Uint16Array(typedArray)
new Uint16Array(object)

new Uint16Array(buffer)
new Uint16Array(buffer, byteOffset)
new Uint16Array(buffer, byteOffset, length)

Note: Uint16Array() can only be constructed with new. Attempting to call it without new throws a TypeError.

Parameters

See TypedArray.

Exceptions

See TypedArray.