How can you point to [[Int8Array]], wants to earn him the value of the
With no one to give directions, thank you
CodePudding user response:
XXX. [[Int8Array]] this doesn't work, how do we getCodePudding user response:
[[Int8Array]] like this, is not a "properties", Int8Array (716198) is an it can be converted into the corresponding view (Int8Array) after the length of the array, ArrayBuffer can generate a lot of different view typed arrayInt8, Uint8 length is equal to the original length
Int16, because each of 2 bytes, length is, therefore, the original length/2
Int32, because each of 4 bytes, so the length is the length/4
Also because of this feature, so the ArrayBuffer convertible view the type of the array is indefinite, length if in multiples of four, for example, will not be able to convert Int32Array, in multiples of 2 will not be able to convert Int16Array
You want to get Int8Array type array view, you first based on the original buffer to create it, and then basically the way common data operation line
Const int8Array=new int8Array (buffer)
Int8Array. ForEach (item=& gt; The console. The log (item))
Well, maybe that's it, let's go find more detailed under the baidu