This feature is well established and works across many devices and browser versions. It’s been available across browsers since July 2015.
A TypedArray object describes an array-like view of an underlying binary data buffer. There is no global property named TypedArray, nor is there a directly visible TypedArray constructor. Instead, there are a number of different global properties, whose values are typed array constructors for specific element types, listed below. On the following pages you will find common properties and methods that can be used with any typed array containing elements of any type.
The TypedArray constructor (often referred to as %TypedArray% to indicate its "intrinsicness", since it does not correspond to any global exposed to a JavaScript program) serves as the common superclass of all TypedArray subclasses. Think about %TypedArray% as an "abstract class" providing a common interface of utility methods for all typed array subclasses. This constructor is not directly exposed: there is no global TypedArray property. It is only accessible through Object.getPrototypeOf(Int8Array) and similar.
When creating an instance of a TypedArray subclass (e.g., Int8Array), an array buffer is created internally in memory or, if an ArrayBuffer object is given as constructor argument, that ArrayBuffer is used instead. The buffer address is saved as an internal property of the instance and all the methods of %TypedArray%.prototype will set and get values based on that array buffer address.
| Type | Value Range | Size in bytes | Web IDL type |
|---|---|---|---|
Int8Array | -128 to 127 | 1 | byte |
Uint8Array | 0 to 255 | 1 | octet |
Uint8ClampedArray | 0 to 255 | 1 | octet |
Int16Array | -32768 to 32767 | 2 | short |
Uint16Array | 0 to 65535 | 2 | unsigned short |
Int32Array | -2147483648 to 2147483647 | 4 | long |
Uint32Array | 0 to 4294967295 | 4 | unsigned long |
Float16Array |
-65504 to 65504
| 2 | N/A |
Float32Array |
-3.4e38 to 3.4e38
| 4 | unrestricted float |
Float64Array |
-1.8e308 to 1.8e308
| 8 | unrestricted double |
BigInt64Array | -263 to 263 - 1 | 8 | bigint |
BigUint64Array | 0 to 264 - 1 | 8 | bigint |
All typed arrays operate on ArrayBuffers, where you can observe the exact byte representation of each element, so how the numbers are encoded in binary format is significant.
Uint8Array, Uint16Array, Uint32Array, and BigUint64Array) store the number directly in binary.Int8Array, Int16Array, Int32Array, and BigInt64Array) store the number using two's complement.Float16Array, Float32Array, and Float64Array) store the number using IEEE 754 floating-point format. The Number reference has more information about the exact format. JavaScript numbers use double precision floating point format by default, which is the same as Float64Array. Float32Array uses 23 (instead of 52) bits for the mantissa and 8 (instead of 11) bits for the exponent. Float16Array uses 10 bits for the mantissa and 5 bits for the exponent. Note that the spec requires all NaN values to use the same bit encoding, but the exact bit pattern is implementation-dependent.Uint8ClampedArray is a special case. It stores the number in binary like Uint8Array does, but when you store a number outside the range, it clamps the number to the range 0 to 255 by mathematical value, instead of truncating the most significant bits.All typed arrays except Int8Array, Uint8Array, and Uint8ClampedArray store each element using multiple bytes. These bytes can either be ordered from most significant to least significant (big-endian) or from least significant to most significant (little-endian). See Endianness for more explanation. Typed arrays always use the platform's native byte order. If you want to specify the endianness when writing and reading from buffers, you should use a DataView instead.
When writing to these typed arrays, values that are outside the representable range are normalized.
Uint8ClampedArray) use fixed-width number conversion, which first truncates the decimal part of the number and then takes the lowest bits.Uint8ClampedArray first clamps the number to the range 0 to 255 (values greater than 255 become 255 and values less than 0 become 0). It then rounds (instead of flooring) the result to the nearest integer, with half-to-even; meaning if the number is exactly between two integers, it rounds to the nearest even integer. For example, 0.5 becomes 0, 1.5 becomes 2, and 2.5 becomes 2.Float16Array and Float32Array perform a "round to even" to convert 64-bit floating point numbers to 32-bit and 16-bit. This is the same algorithm as provided by Math.fround() and Math.f16round().When a TypedArray is created as a view of a resizable buffer, resizing the underlying buffer will have different effects on the size of the TypedArray depending on whether the TypedArray is constructed as length-tracking.
If a typed array is created without a specific size by omitting the third parameter or passing undefined, the typed array will become length-tracking, and will automatically resize to fit the underlying buffer as the latter is resized:
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });
const float32 = new Float32Array(buffer);
console.log(float32.byteLength); // 8
console.log(float32.length); // 2
buffer.resize(12);
console.log(float32.byteLength); // 12
console.log(float32.length); // 3
If a typed array is created with a specific size using the third length parameter, it won't resize to contain the buffer as the latter is grown:
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });
const float32 = new Float32Array(buffer, 0, 2);
console.log(float32.byteLength); // 8
console.log(float32.length); // 2
console.log(float32[0]); // 0, the initial value
buffer.resize(12);
console.log(float32.byteLength); // 8
console.log(float32.length); // 2
console.log(float32[0]); // 0, the initial value
When a buffer is shrunk, the viewing typed array may become out of bounds, in which case the typed array's observed size will decrease to 0. This is the only case where a non-length-tracking typed array's length may change.
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });
const float32 = new Float32Array(buffer, 0, 2);
buffer.resize(7);
console.log(float32.byteLength); // 0
console.log(float32.length); // 0
console.log(float32[0]); // undefined
If you then grow the buffer again to bring the typed array back in bounds, the typed array's size will be restored to its original value.
buffer.resize(8); console.log(float32.byteLength); // 8 console.log(float32.length); // 2 console.log(float32[0]); // 0 - back in bounds again!
The same can happen for length-tracking typed arrays as well, if the buffer is shrunk beyond the byteOffset.
const buffer = new ArrayBuffer(8, { maxByteLength: 16 });
const float32 = new Float32Array(buffer, 4);
// float32 is length-tracking, but it only extends from the 4th byte
// to the end of the buffer, so if the buffer is resized to be shorter
// than 4 bytes, the typed array will become out of bounds
buffer.resize(3);
console.log(float32.byteLength); // 0
This object cannot be instantiated directly — attempting to construct it with new throws a TypeError.
new (Object.getPrototypeOf(Int8Array))(); // TypeError: Abstract class TypedArray not directly constructable
Instead, you create an instance of a typed array of a particular type, such as an Int8Array or a BigInt64Array. These objects all have a common syntax for their constructors:
new TypedArray() new TypedArray(length) new TypedArray(typedArray) new TypedArray(object) new TypedArray(buffer) new TypedArray(buffer, byteOffset) new TypedArray(buffer, byteOffset, length)
Where TypedArray is a constructor for one of the concrete types.
typedArrayWhen called with an instance of a TypedArray subclass, the typedArray gets copied into a new typed array. For a non-bigint TypedArray constructor, the typedArray parameter can only be of one of the non-bigint types (such as Int32Array). Similarly, for a bigint TypedArray constructor (BigInt64Array or BigUint64Array), the typedArray parameter can only be of one of the bigint types. Each value in typedArray is converted to the corresponding type of the constructor before being copied into the new array. The length of the new typed array will be same as the length of the typedArray argument.
objectWhen called with an object that's not a TypedArray instance, a new typed array is created in the same way as the TypedArray.from() method.
length OptionalWhen called with a non-object, the parameter will be treated as a number specifying the length of the typed array. An internal array buffer is created in memory, of size length multiplied by BYTES_PER_ELEMENT bytes, filled with zeros. Omitting all parameters is equivalent to using 0 as length.
buffer, byteOffset Optional, length OptionalWhen called with an ArrayBuffer or SharedArrayBuffer instance, and optionally a byteOffset and a length argument, a new typed array view is created that views the specified buffer. The byteOffset (in bytes) and length (in number of elements, each occupying BYTES_PER_ELEMENT bytes) parameters specify the memory range that will be exposed by the typed array view. If both are omitted, all of buffer is viewed; if only length is omitted, the remainder of buffer starting from byteOffset is viewed. If length is omitted, the typed array becomes length-tracking.
All TypeArray subclass constructors operate in the same way. They would all throw the following exceptions:
TypeErrorThrown in one of the following cases:
typedArray is passed but it is a bigint type while the current constructor is not, or vice versa.typedArray is passed but the buffer it's viewing is detached, or a detached buffer is directly passed.RangeErrorThrown in one of the following cases:
buffer (if the length parameter is not specified) or byteOffset is not an integral multiple of the new typed array's element size.byteOffset is not a valid array index (an integer between 0 and 253 - 1).byteOffset + length * TypedArray.BYTES_PER_ELEMENT > buffer.byteLength.These properties are defined on the TypedArray constructor object and are thus shared by all TypedArray subclass constructors.
TypedArray[Symbol.species]The constructor function used to create derived objects.
All TypedArray subclasses also have the following static properties:
TypedArray.BYTES_PER_ELEMENTReturns a number value of the element size for the different TypedArray objects.
These methods are defined on the TypedArray constructor object and are thus shared by all TypedArray subclass constructors.
TypedArray.from()Creates a new TypedArray from an array-like or iterable object. See also Array.from().
TypedArray.of()Creates a new TypedArray with a variable number of arguments. See also Array.of().
These properties are defined on TypedArray.prototype and shared by all TypedArray subclass instances.
TypedArray.prototype.bufferReturns the ArrayBuffer referenced by the typed array.
TypedArray.prototype.byteLengthReturns the length (in bytes) of the typed array.
TypedArray.prototype.byteOffsetReturns the offset (in bytes) of the typed array from the start of its ArrayBuffer.
TypedArray.prototype.constructorThe constructor function that created the instance object. TypedArray.prototype.constructor is the hidden TypedArray constructor function, but each typed array subclass also defines its own constructor property.
TypedArray.prototype.lengthReturns the number of elements held in the typed array.
TypedArray.prototype[Symbol.toStringTag]The initial value of the TypedArray.prototype[Symbol.toStringTag] property is a getter that returns the same string as the typed array constructor's name. It returns undefined if the this value is not one of the typed array subclasses. This property is used in Object.prototype.toString(). However, because TypedArray also has its own toString() method, this property is not used unless you call Object.prototype.toString.call() with a typed array as thisArg.
All TypedArray subclasses also have the following instance properties:
TypedArray.prototype.BYTES_PER_ELEMENTReturns a number value of the element size for the different TypedArray objects.
These methods are defined on the TypedArray prototype object and are thus shared by all TypedArray subclass instances.
TypedArray.prototype.at()Takes an integer value and returns the item at that index. This method allows for negative integers, which count back from the last item.
TypedArray.prototype.copyWithin()Copies a sequence of array elements within the array. See also Array.prototype.copyWithin().
TypedArray.prototype.entries()Returns a new array iterator object that contains the key/value pairs for each index in the array. See also Array.prototype.entries().
TypedArray.prototype.every()Returns false if it finds one element in the array that does not satisfy the provided testing function. Otherwise, it returns true. See also Array.prototype.every().
TypedArray.prototype.fill()Fills all the elements of an array from a start index to an end index with a static value. See also Array.prototype.fill().
TypedArray.prototype.filter()Creates a new array with all of the elements of this array for which the provided filtering function returns true. See also Array.prototype.filter().
TypedArray.prototype.find()Returns the first element in the array that satisfies a provided testing function, or undefined if no appropriate element is found. See also Array.prototype.find().
TypedArray.prototype.findIndex()Returns the first index value in the array that has an element that satisfies a provided testing function, or -1 if no appropriate element was found. See also Array.prototype.findIndex().
TypedArray.prototype.findLast()Returns the value of the last element in the array that satisfies a provided testing function, or undefined if no appropriate element is found. See also Array.prototype.findLast().
TypedArray.prototype.findLastIndex()Returns the index of the last element in the array that satisfies a provided testing function, or -1 if no appropriate element was found. See also Array.prototype.findLastIndex().
TypedArray.prototype.forEach()Calls a function for each element in the array. See also Array.prototype.forEach().
TypedArray.prototype.includes()Determines whether a typed array includes a certain element, returning true or false as appropriate. See also Array.prototype.includes().
TypedArray.prototype.indexOf()Returns the first (least) index of an element within the array equal to the specified value, or -1 if none is found. See also Array.prototype.indexOf().
TypedArray.prototype.join()Joins all elements of an array into a string. See also Array.prototype.join().
TypedArray.prototype.keys()Returns a new array iterator that contains the keys for each index in the array. See also Array.prototype.keys().
TypedArray.prototype.lastIndexOf()Returns the last (greatest) index of an element within the array equal to the specified value, or -1 if none is found. See also Array.prototype.lastIndexOf().
TypedArray.prototype.map()Creates a new array with the results of calling a provided function on every element in this array. See also Array.prototype.map().
TypedArray.prototype.reduce()Apply a function against an accumulator and each value of the array (from left-to-right) as to reduce it to a single value. See also Array.prototype.reduce().
TypedArray.prototype.reduceRight()Apply a function against an accumulator and each value of the array (from right-to-left) as to reduce it to a single value. See also Array.prototype.reduceRight().
TypedArray.prototype.reverse()Reverses the order of the elements of an array — the first becomes the last, and the last becomes the first. See also Array.prototype.reverse().
TypedArray.prototype.set()Stores multiple values in the typed array, reading input values from a specified array.
TypedArray.prototype.slice()Extracts a section of an array and returns a new array. See also Array.prototype.slice().
TypedArray.prototype.some()Returns true if it finds one element in the array that satisfies the provided testing function. Otherwise, it returns false. See also Array.prototype.some().
TypedArray.prototype.sort()Sorts the elements of an array in place and returns the array. See also Array.prototype.sort().
TypedArray.prototype.subarray()Returns a new TypedArray from the given start and end element index.
TypedArray.prototype.toLocaleString()Returns a localized string representing the array and its elements. See also Array.prototype.toLocaleString().
TypedArray.prototype.toReversed()Returns a new array with the elements in reversed order, without modifying the original array.
TypedArray.prototype.toSorted()Returns a new array with the elements sorted in ascending order, without modifying the original array.
TypedArray.prototype.toString()Returns a string representing the array and its elements. See also Array.prototype.toString().
TypedArray.prototype.values()Returns a new array iterator object that contains the values for each index in the array. See also Array.prototype.values().
TypedArray.prototype.with()Returns a new array with the element at the given index replaced with the given value, without modifying the original array.
TypedArray.prototype[Symbol.iterator]()Returns a new array iterator object that contains the values for each index in the array.
You can reference elements in the array using standard array index syntax (that is, using bracket notation). However, getting or setting indexed properties on typed arrays will not search in the prototype chain for this property, even when the indices are out of bound. Indexed properties will consult the ArrayBuffer and will never look at object properties. You can still use named properties, just like with all objects.
// Setting and getting using standard array syntax const int16 = new Int16Array(2); int16[0] = 42; console.log(int16[0]); // 42 // Indexed properties on prototypes are not consulted (Fx 25) Int8Array.prototype[20] = "foo"; new Int8Array(32)[20]; // 0 // even when out of bound Int8Array.prototype[20] = "foo"; new Int8Array(8)[20]; // undefined // or with negative integers Int8Array.prototype[-1] = "foo"; new Int8Array(8)[-1]; // undefined // Named properties are allowed, though (Fx 30) Int8Array.prototype.foo = "bar"; new Int8Array(32).foo; // "bar"
TypedArrays that aren't empty cannot be frozen, as their underlying ArrayBuffer could be mutated through another TypedArray view of the buffer. This would mean that the object would never genuinely be frozen.
const i8 = Int8Array.of(1, 2, 3); Object.freeze(i8); // TypeError: Cannot freeze array buffer views with elements
When constructing a TypedArray as a view onto an ArrayBuffer, the byteOffset argument must be aligned to its element size; in other words, the offset must be a multiple of BYTES_PER_ELEMENT.
const i32 = new Int32Array(new ArrayBuffer(4), 1); // RangeError: start offset of Int32Array should be a multiple of 4
const i32 = new Int32Array(new ArrayBuffer(4), 0);
Like the byteOffset parameter, the byteLength property of an ArrayBuffer passed to a TypedArray's constructor must be a multiple of the constructor's BYTES_PER_ELEMENT.
const i32 = new Int32Array(new ArrayBuffer(3)); // RangeError: byte length of Int32Array should be a multiple of 4
const i32 = new Int32Array(new ArrayBuffer(4));
| Desktop | Mobile | Server | |||||||||||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| Chrome | Edge | Firefox | Opera | Safari | Chrome Android | Firefox for Android | Opera Android | Safari on IOS | Samsung Internet | WebView Android | WebView on iOS | Bun | Deno | Node.js | |
@@iterator |
38 | 12 |
3627–36A placeholder property named@@iterator is used.17–27A placeholder property namediterator is used. |
25 | 10 | 38 |
3627–36A placeholder property named@@iterator is used.17–27A placeholder property namediterator is used. |
25 | 10 | 3.0 | 38 | 10 | 1.0.0 | 1.0 | 0.12.0 |
@@species |
51 | 13 | 48 | 38 | 10 | 51 | 48 | 41 | 10 | 5.0 | 51 | 10 | 1.0.0 | 1.0 | 6.5.0 |
BYTES_PER_ELEMENT |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
TypedArray |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
at |
92 | 92 | 90 | 78 | 15.4 | 92 | 90 | 65 | 15.4 | 16.0 | 92 | 15.4 | 1.0.0 | No | 16.6.0 |
buffer |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
byteLength |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
byteOffset |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
constructor_without_parameters |
7 | 12 | 55 | 11.6 | 5.1 | 18 | 55 | 12 | 5 | 1.0 | 4.4 | 5 | 1.0.0 | 1.0 | 0.10.0 |
copyWithin |
45 | 12 | 34 | 32 | 10 | 45 | 34 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
entries |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 0.12.0 |
every |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
fill |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
filter |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
find |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
findIndex |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
findLast |
97 | 97 | 104 | 83 | 15.4 | 97 | 104 | 68 | 15.4 | 18.0 | 97 | 15.4 | 1.0.0 | 1.16 | No |
findLastIndex |
97 | 97 | 104 | 83 | 15.4 | 97 | 104 | 68 | 15.4 | 18.0 | 97 | 15.4 | 1.0.0 | 1.16 | No |
forEach |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
from |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
includes |
47 | 14 | 43 | 34 | 10 | 47 | 43 | 34 | 10 | 5.0 | 47 | 10 | 1.0.0 | 1.0 | 6.0.0 |
indexOf |
45 | 12 | 37Starting with Firefox 47, this method will no longer return-0. For example, new Uint8Array([0]).indexOf(0, -0) will now always return +0. |
32 | 10 | 45 | 37Starting with Firefox for Android 47, this method will no longer return-0. For example, new Uint8Array([0]).indexOf(0, -0) will now always return +0. |
32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
index_properties_not_consulting_prototype |
7Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
12Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
25 | 11.6Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
5.1Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
18Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
25 | 12Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
5Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
1.0Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
4.4Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
5Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
1.0.0Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
1.0Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
0.10.0Negative integers are not considered as indexed properties and therefore return the value of the prototype property. |
iterable_in_constructor |
39 | 14 | 52 | 26 | 10 | 39 | 52 | 26 | 10 | 4.0 | 39 | 10 | 1.0.0 | 1.0 | 4.0.0 |
join |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
keys |
38 | 12 | 37 | 25 | 10 | 38 | 37 | 25 | 10 | 3.0 | 38 | 10 | 1.0.0 | 1.0 | 0.12.0 |
lastIndexOf |
45 | 12 | 37Starting with Firefox 47, this method will no longer return-0. For example, new Uint8Array([0]).lastIndexOf(0, -0) will now always return +0. |
32 | 10 | 45 | 37Starting with Firefox for Android 47, this method will no longer return-0. For example, new Uint8Array([0]).lastIndexOf(0, -0) will now always return +0. |
32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
length |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
map |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
name |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
named_properties |
7 | 12 | 30 | 11.6 | 5.1 | 18 | 30 | 12 | 5 | 1.0 | 4.4 | 5 | 1.0.0 | 1.0 | 0.10.0 |
of |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
reduce |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
reduceRight |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
reverse |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
set |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.10.0 |
slice |
45 | 12 | 38 | 32 | 10 | 45 | 38 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
some |
45 | 12 | 37 | 32 | 10 | 45 | 37 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
sort |
45 | 12 | 46 | 32 | 10 | 45 | 46 | 32 | 10 | 5.0 | 45 | 10 | 1.0.0 | 1.0 | 4.0.0 |
subarray |
7 | 12 | 4 | 11.6 | 5.1 | 18 | 4 | 12 | 4.2 | 1.0 | 4 | 4.2 | 1.0.0 | 1.0 | 0.12.0 |
toLocaleString |
7 | 12 | 51 | 11.6 | 5.1 | 18 | 51 | 12 | 5 | 1.0 | 4.4 | 5 | 1.0.0 | 1.0 | 0.10.0 |
toReversed |
110 | 110 | 115 | 96 | 16 | 110 | 115 | 74 | 16 | 21.0 | 110 | 16 | 1.0.0 | 1.31 | 20.0.0 |
toSorted |
110 | 110 | 115 | 96 | 16 | 110 | 115 | 74 | 16 | 21.0 | 110 | 16 | 1.0.0 | 1.31 | 20.0.0 |
toString |
7 | 12 | 51 | 11.6 | 5.1 | 18 | 51 | 12 | 5 | 1.0 | 4.4 | 5 | 1.0.0 | 1.0 | 0.10.0 |
values |
38 | 12 | 37 | 25 | 10 | 38 | 37 | 25 | 10 | 3.0 | 38 | 10 | 1.0.0 | 1.0 | 0.12.0 |
with |
110 | 110 | 115 | 96 | 16 | 110 | 115 | 74 | 16 | 21.0 | 110 | 16 | 1.0.0 | 1.31 | 20.0.0 |
© 2005–2025 MDN contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/TypedArray