You-Dont-Know-JS
You-Dont-Know-JS copied to clipboard
Update es6 & beyond - Chapter 5: Collections - TypedArray constructor description
As mentioned in MDN and other sources TypedArray(length) constructor makes a view of length elements not bytes.
It can be also tested by:
var x = new Uint32Array(2);
console.log(x.length) // 2
console.log(x.byteLength) // 8
x[1] = 25;
console.log(x[1]); // 25