SharedArrayBuffer.byteLength Property in JavaScript


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

Live Demo

<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 

karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know

Updated on: 30-Jul-2019

34 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements