JavaScript typedArray.BYTES_PER_ELEMENT Property Last Updated : 15 Feb, 2023 Comments Improve Suggest changes Like Article Like Report The typedArray.BYTES_PER_ELEMENT is an inbuilt property in JavaScript that is used to return the size in bytes of each element in a given typedArray. Syntax: typedArray.BYTES_PER_ELEMENT; Parameter: It does not accept any parameter because it is a property, not a function. Return value: It returns the size in bytes of each element in a given tyepedArray. Example : javascript // Calling BYTES_PER_ELEMENT on some typedArray a = Int8Array.BYTES_PER_ELEMENT; b = Uint8Array.BYTES_PER_ELEMENT; c = Uint8ClampedArray.BYTES_PER_ELEMENT; d = Int16Array.BYTES_PER_ELEMENT; e = Uint16Array.BYTES_PER_ELEMENT; f = Int32Array.BYTES_PER_ELEMENT; g = Uint32Array.BYTES_PER_ELEMENT; h = Float32Array.BYTES_PER_ELEMENT; i = Float64Array.BYTES_PER_ELEMENT; // Printing the size in bytes of the // each element in the given typedArray. console.log(a); console.log(b); console.log(c); console.log(d); console.log(e); console.log(f); console.log(g); console.log(h); console.log(i); Output: 1 1 1 2 2 4 4 4 8 Comment More infoAdvertise with us Next Article JavaScript typedArray.BYTES_PER_ELEMENT Property K Kanchan_Ray Follow Improve Article Tags : JavaScript Web Technologies javascript-typedArray Similar Reads JavaScript typedArray.byteOffset Property The typedArray.byteOffset is an inbuilt property in JavaScript that is used to return the offset in bytes of a given typedArray from the start of its ArrayBuffer. Syntax: typedArray.byteOffset Parameter: It does not accept any parameter because it is a property, not a function. Return value: It retu 1 min read JavaScript typedArray.from() Property The typedArray.from() is an inbuilt function in JavaScript which is used to construct a new typedArray from a normal array or any iterable object. List of different typedArrays are specified in the table below: Int8Array();Int16Array();Uint32Array();Uint8Array();Uint16Array();Float32Array();Uint8Cla 2 min read JavaScript typedArray.set() Method The typedArray.set() is an inbuilt function in JavaScript which is used to stores a number of values in the given typedArray. typedArray.set(typedArray, offset) Parameters: It accept two parameters which are specified below- typedarray: It is the source array. offset: It is optional and it is into t 1 min read JavaScript typedArray.@@species with Example The typedArray.@@species is an inbuilt property in JavaScript that is used to return the constructor of the given typedArray. The typedArray is of many types like: Int8Array();Int16Array();Uint32Array();Uint8Array();Uint16Array();Float32Array();Uint8ClampedArray();Int32Array();Float64Array(); Syntax 1 min read JavaScript typedArray.entries() with Examples The Javascript typedArray.entries() is an inbuilt function in JavaScript that gives a new array iterator object containing the key and value pairs of the given typedArray object. Syntax: typedArray.entries() Parameter: It does not accept any parameters. Return value It returns a new array iterator o 2 min read Like