TypedArray.buffer property in JavaScript


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

Syntax

Its Syntax is as follows

obj.buffer;

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.buffer.byteLength);
   </script>
</body>
</html>

Output

156

Samual Sam
Samual Sam

Learning faster. Every day.

Updated on: 25-Jun-2020

27 Views

Kickstart Your Career

Get certified by completing the course

Get Started
Advertisements