DataView.buffer property in JavaScript

JavascriptWeb DevelopmentFront End Scripts

The buffer property of the DataView represents the ArrayBuffer of the current DataView.

Syntax

Its syntax is as follows

dataView.buffer;

Example

Try the following example.

 Live Demo

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

Output

156
raja
Published on 24-Oct-2018 14:56:04
Advertisements