bugl
bugl
HomeLearnPatternsSearch
HomeLearnPatternsSearch

Loading lesson path

Learn/JavaScript/Objects, Classes, and Advanced Patterns
JavaScript•Objects, Classes, and Advanced Patterns

Typed Array Reference

Concept visual

Typed Array Reference

Pointer walk
two pointers
leftright102132436485116
left=0
right=6
1
3

Start at both ends

Typed Array Types

Revised July 2025

Name

Range

Type

Int8Array

Formula

- 128 / 127

1 byte signed integer

Uint8Array

Formula

0 / 255

1 byte unsigned integer

Uint8ClampedArray

Formula

0 / 255

1 byte unsigned integer

Int16Array

Formula

- 32768 / 32767

2 bytes signed short

Uint16Array

Formula

0 / 65535

2 bytes unsigned short

Int32Array

-2 31 / 2 31 - 1 4 bytes signed long

Uint32Array

Formula

0 / 2

32 - 1 4 bytes unsigned long

BigInt64Array

-2 63 / 2 63 - 1 8 bytes signed big integer

BigUint64Array

Formula

0 / 2

64 - 1 8 bytes unsigned big integer

Float16Array

Formula

- 65504 / 65504

2 bytes floating point

Float32Array

Formula

- 3.4e38 / 3.4e38

4 bytes floating point

Float64Array

Formula

- 1.8e308 / 1.8e308

8 bytes floating point

Typed Array Methods

Revised July 2025

Method

Description at()

Returns one indexed element from a typed array byteLength Returns the length (in bytes) of a typed array. byteOffset Returns the offset (in bytes) of a typed array from the start of its ArrayBuffer BYTES_PER_

Element

Returns the number of bytes used to store one element in a typed array copyWithin() Copies array elements to another position in the array entries()

Formula

Returns an iterator object with the key/value pairs from the array every()

Executes a function for each typed array element fill() Fill all array elements with a value filter() Returns a new array filled with elements that pass a test find() Returns the first element that satisfies a condition findIndex() Returns the index of the first element that satisfies a condition findLast() Returns the last element that satisfies a condition findLastIndex() Returns the index of the last element that satisfies a condition forEach() Executes a function for each typed array element from() Returns a typed array from any object with a length property includes() Returns true if an array includes a specified value indexOf() Returns the first index (position) of a specified value join() Returns the elements of an array as a string keys() Returns the keys of a typed array lastIndexOf() Returns the last index (position) of a specified value length Returns the lenth of the typed array map() Returns a new array from calling a function for every array element name Returns the name of the typed array of() Returns a new typed array from an existing array reduce() Reduce the values of an array to a single value reduceRight()

Formula

Reduce the values of an array to a single value (right - to - left)

reverse()

Reverses a typed array in place set()

Stores values in a typed array from another array slice() Reurns a new typed array sliced out of a typed array some() Reurns true if one element satisfies a condition sort()

Sorts an array in place subarray()

Returns a subarray in the same memory space toLocaleString() Returns all elements converted with their toLocaleString methods toReversed() Reverses an array into a new array. toSorted() Sorts an array into a new array. toString() Returns a string of all typed array elements values() Returns an iterator object with the values of an typed array with() Returns a new typed array with an updated array element

Previous

Typed Array Methods

Next

JavaScript ArrayBuffer