The byteLength property of the SharedArrayBuffer returns an unsigned, 32-bit integer that specifies the size/length of a SharedArrayBuffer.
Syntax
Its Syntax is as follows
sharedArrayBuffer.byteLength
Example
<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>
Output
length of the shared array buffer is: 8