JavaScript TypedArray


The JavaScript TypedArray object illustrates an array like view of an underlying binary data buffer. There are many number of different global properties, whose values are TypedArray constructors for specific element types, listed below.

Types of TypedArray

Int8Array

  • Size in bytes: 1
  • Description: 8-bit two's compliment signed integer.
  • Type: byte.
  • Value Range: -128 to 127

Unit8Array

  • Size in bytes: 1
  • Description: 8-bit two's compliment signed octet.
  • Type: octet.
  • Value Range: 0 to 255.

Unit8ClampedArray

  • Size in bytes: 1
  • Description: 8-bit unsigned integer (clamped) octet.
  • Type: octet.
  • Value Range: 0 to 255.

Int16Array

  • Size in bytes: 2
  • Description: 16-bit two's complement signed integer.
  • Type: short.
  • Value Range: -32768 to 32767.

Unit16Array

  • Size in bytes: 2
  • Description: 16-bit unsigned integer.
  • Type: unsigned short.
  • Value Range: 0 to 65535.

Int32Array

  • Size in bytes: 4
  • Description: 32-bit two's complement signed integer.
  • Type: long.
  • Value Range: -2147483648 to 2147483647.

Uint32Array

  • Size in bytes: 4
  • Description: 32-bit unsigned integer.
  • Type: unsigned long.
  • Value Range: 0 to 4294967295

Float32Array

  • Size in bytes: 4
  • Description: 32-bit IEEE floating point number unrestricted float.
  • Type: unrestricted float.
  • Value Range: 1.2x10-38 to 3.4x1038

Float64Array

  • Size in bytes: 8
  • Description: 64-bit IEEE floating point number unrestricted double.
  • Type: unrestricted double.
  • Value Range: 5.0x10-324 to 1.8x10308