SharedArrayBuffer की byteLength प्रॉपर्टी एक अनसाइन्ड, 32-बिट इंटीजर लौटाती है जो SharedArrayBuffer के आकार/लंबाई को निर्दिष्ट करती है।
सिंटैक्स
इसका सिंटैक्स निम्नानुसार है:
sharedArrayBuffer.byteLength
उदाहरण
<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>
आउटपुट
length of the shared array buffer is: 8