mirror of
https://github.com/UberGuidoZ/Flipper.git
synced 2024-12-23 15:00:13 +00:00
9 lines
270 B
JavaScript
9 lines
270 B
JavaScript
|
let arr_1 = Uint8Array([0, 1, 2, 3, 4, 5, 6, 7, 8, 9]);
|
||
|
print("len =", arr_1.buffer.byteLength);
|
||
|
|
||
|
let arr_2 = Uint8Array(arr_1.buffer.slice(2, 6));
|
||
|
print("slice len =", arr_2.buffer.byteLength);
|
||
|
for (let i = 0; i < arr_2.buffer.byteLength; i++) {
|
||
|
print(arr_2[i]);
|
||
|
}
|