DataView.byteLength property in JavaScript



The byteLength property of the DataView represents the length of the current Data View.

Syntax

Its syntax is as follows

dataView.byteLength();

Example

 Live Demo

<html>
<head>
   <title>JavaScript Example</title>
</head>
<body>
   <script type="text/javascript">
      var arrayBuffer = new ArrayBuffer(8);
      var dataView = new DataView(arrayBuffer);
      document.write(dataView.byteLength);
   </script>
</body>
</html>

Output

8
karthikeya Boyini
karthikeya Boyini

I love programming (: That's all I know


Advertisements