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

<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: 2026-03-11T22:50:43+05:30

104 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements