The byteLength property of the DataView represents the length of the current Data View.
Syntax
Its syntax is as follows
dataView.byteLength();
Example
<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