BYTES_PER_ELEMENT
Example
// Create an Array
const myArr = new Int32Array(10)
// Display name
Int32Array.BYTES_PER_ELEMENT
Try it Yourself »
Description
The BYTES_PER_ELEMENT
property returns the number of bytes per array element.
Syntax
typed-array.BYTES_PER_ELEMENT
typed-array must be one of the following: Int8ArrayUint8Array Uint8ClampedArray Int16Array Uint16Array Int32Array Uint32Array Float16Array Float32Array Float64Array BigInt64Array BigUint64Array |
Parameters
NONE |
Return Value
Type | Description |
Number | Bytes per array element. |
JavaScript Typed Arrays
Browser Support
typed-array.BYTES_PER_ELEMENT
is an ECMAScript6 (ES6 2015) feature.
JavaScript 2015 is fully supported in all modern browsers since June 2017:
Chrome 51 | Edge 15 | Firefox 54 | Safari 10 | Opera 38 |
May 2016 | Apr 2017 | Jun 2017 | Sep 2016 | Jun 2016 |