JavaScript 中的 SharedArrayBuffer.byteLength 属性
htmljavascriptprogramming scripts更新于 2024/3/18 14:04:17
SharedArrayBuffer 的 byteLength 属性返回一个无符号的 32 位整数,该整数指定 SharedArrayBuffer 的大小/长度。
语法
其语法如下
sharedArrayBuffer.byteLength
示例
<html>
<head>
<title>JavaScript 示例</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>
输出
length of the shared array buffer is: 8
相关文章
有用资源
html 参考教程 - 该教程包含有关 html 的更多信息:https://www.cainiaomax.com/html/

