TypedArray byteLength Property in JavaScript



The byteLength property of the TypedArray object represents the length of its(in bytes)TypedArray.

Syntax

Its Syntax is as follows

typedArray.byteLength();

Example

 Live Demo

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var buffer = new ArrayBuffer(156);
      var float32 = new Float32Array(buffer);
      document.write(float32.byteLength);
   </script>
</body>
</html>

Output

156
Updated on: 2020-06-25T13:15:45+05:30

61 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements