Typed arrays (initial support)Baseline · Widely available
Typed arrays are ordered lists of JavaScript values, where all values are of the same numerical type, such as 8-bit integers or 32-bit floating point numbers.
Supported in all major browsers for at least 30 months — safe to use without fallbacks. Baseline since Jul 29, 2015. Widely available since Jan 29, 2018.
Browser support
DesktopChrome
1–6Not supported
7+Supportedsince Oct 19, 2010
Current: 155Edge
12+Supportedsince Jul 29, 2015
Current: 154Firefox
1–3.6Not supported
4+Supportedsince Mar 22, 2011
Current: 157Safari
1–5Not supported
5.1+Supportedsince Jul 20, 2011
Current: 27MobileChrome Android
18+Supportedsince Jun 27, 2012
Current: 155Firefox Android
4+Supportedsince Mar 29, 2011
Current: 157Safari iOS
1–4Not supported
4.2+Supportedsince Nov 22, 2010
Current: 27How to use
This feature is Baseline widely available — use it freely, no fallback needed.
Example
Full syntax and examples are on MDN: ArrayBuffer.
Feature detection
JS · check before using
// Syntax can't be tested with an if-statement — an unsupported
// browser fails to parse the whole script. Either transpile for older
// targets (e.g. Babel/TypeScript/esbuild), or probe in isolation:
let supported = true;
try {
new Function("/* code that uses the syntax */");
} catch {
supported = false;
}This is a language syntax feature.
Documentation (MDN)
Specification
- tc39.es#table-49 ↗
- tc39.es#sec-typedarray-constructors ↗
- tc39.es#sec-typedarray-objects ↗
- tc39.es#sec-typedarray.bytes_per_element ↗
- tc39.es#sec-get-%25typedarray%25.prototype.buffer ↗
- tc39.es#sec-get-%25typedarray%25.prototype.bytelength ↗
- tc39.es#sec-get-%25typedarray%25.prototype.byteoffset ↗
- tc39.es#sec-%25typedarray%25.prototype.join ↗
- tc39.es#sec-get-%25typedarray%25.prototype.length ↗
- tc39.es#sec-properties-of-the-typedarray-constructors ↗
- tc39.es#sec-%25typedarray%25.prototype.reverse ↗
- tc39.es#sec-%25typedarray%25.prototype.set ↗
- tc39.es#sec-%25typedarray%25.prototype.slice ↗
- tc39.es#sec-%25typedarray%25.prototype.sort ↗
- tc39.es#sec-%25typedarray%25.prototype.subarray ↗
- tc39.es#sec-%25typedarray%25.prototype.tolocalestring ↗
- tc39.es#sec-%25typedarray%25.prototype.tostring ↗
Usage share
Sub-features
Support for each part of the feature (82). The overall table above shows when the whole feature works.
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| ArrayBuffer | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| ArrayBuffer.@@species | 51 | 13 | 48 | 10 | 51 | 48 | 10 |
| ArrayBuffer.ArrayBuffer | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| ArrayBuffer.byteLength | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| ArrayBuffer.isView | 32 | 12 | 29 | 7 | 32 | 29 | 7 |
| ArrayBuffer.slice | 17 | 12 | 12 | 5.1 | 18 | 14 | 6 |
| DataView | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.DataView | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.buffer | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.byteLength | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.byteOffset | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getFloat32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getFloat64 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getInt16 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getInt32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getInt8 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getUint16 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getUint32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.getUint8 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setFloat32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
Show 62 more
| Sub-feature | Chrome | Edge | Firefox | Safari | Chrome Android | Firefox Android | Safari iOS |
|---|---|---|---|---|---|---|---|
| DataView.setFloat64 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setInt16 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setInt32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setInt8 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setUint16 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setUint32 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| DataView.setUint8 | 9 | 12 | 15 | 5.1 | 18 | 15 | 5 |
| Float32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Float32Array.Float32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Float32Array.Float32Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Float32Array.Float32Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Float64Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Float64Array.Float64Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Float64Array.Float64Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Float64Array.Float64Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Int16Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int16Array.Int16Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int16Array.Int16Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Int16Array.Int16Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Int32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int32Array.Int32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int32Array.Int32Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Int32Array.Int32Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Int8Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int8Array.Int8Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Int8Array.Int8Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Int8Array.Int8Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| TypedArray | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.@@species | 51 | 13 | 48 | 10 | 51 | 48 | 10 |
| TypedArray.BYTES_PER_ELEMENT | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.buffer | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.byteLength | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.byteOffset | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| TypedArray.index_properties_not_consulting_prototype | 7 | 12 | 25 | 5.1 | 18 | 25 | 5 |
| TypedArray.iterable_in_constructor | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| TypedArray.join | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.length | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.name | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.named_properties | 7 | 12 | 30 | 5.1 | 18 | 30 | 5 |
| TypedArray.reverse | 45 | 12 | 37 | 10 | 45 | 37 | 10 |
| TypedArray.set | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.slice | 45 | 12 | 38 | 10 | 45 | 38 | 10 |
| TypedArray.sort | 45 | 12 | 46 | 10 | 45 | 46 | 10 |
| TypedArray.subarray | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| TypedArray.toString | 7 | 12 | 51 | 5.1 | 18 | 51 | 5 |
| Uint16Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint16Array.Uint16Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint16Array.Uint16Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Uint16Array.Uint16Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Uint32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint32Array.Uint32Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint32Array.Uint32Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Uint32Array.Uint32Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Uint8Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint8Array.Uint8Array | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint8Array.Uint8Array.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Uint8Array.Uint8Array.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |
| Uint8ClampedArray | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint8ClampedArray.Uint8ClampedArray | 7 | 12 | 4 | 5.1 | 18 | 4 | 4.2 |
| Uint8ClampedArray.Uint8ClampedArray.constructor_without_parameters | 7 | 12 | 55 | 5.1 | 18 | 55 | 5 |
| Uint8ClampedArray.Uint8ClampedArray.iterable_allowed | 39 | 14 | 52 | 10 | 39 | 52 | 10 |