byteLength thuộc tính SharedArrayBuffer trả về một số nguyên 32 bit không dấu, chỉ định kích thước / độ dài của SharedArrayBuffer.
Cú pháp
Cú pháp của nó như sau
sharedArrayBuffer.byteLength
Ví dụ
<html>
<head>
<title>JavaScript Example</title>
</head>
<body>
<script type="text/javascript">
var sharedArrayBuffer = new SharedArrayBuffer(8);
var result = sharedArrayBuffer.byteLength;
document.write("length of the shared array buffer is: " + result);
</script>
</body>
</html>
Đầu ra
length of the shared array buffer is: 8