DataView.byteLength property in JavaScript

JavascriptWeb DevelopmentFront End Scripts

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
raja
Published on 24-Oct-2018 14:49:06
Advertisements