Original Post
Hey all,
I had a quick question about how Uint8Array, Uint16Array and all of the others manage memory.
Uint8Array is suppose to be for unsigned bytes, but if I do the following:
var array = new Uint8Array(1);
array[0] = 1;
console.log(typeof array[0]);
It will say the type is number, which is the type of all javascript number variables (represented as a 64bit floating point number).
It would be really nice to have an array of 8bits instead of 64bits, but when using Uint8Array, will the values actually be stored as a byte?
Thanks for the help!
I had a quick question about how Uint8Array, Uint16Array and all of the others manage memory.
Uint8Array is suppose to be for unsigned bytes, but if I do the following:
var array = new Uint8Array(1);
array[0] = 1;
console.log(typeof array[0]);
It will say the type is number, which is the type of all javascript number variables (represented as a 64bit floating point number).
It would be really nice to have an array of 8bits instead of 64bits, but when using Uint8Array, will the values actually be stored as a byte?
Thanks for the help!