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: 25-Jun-2020

41 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements