![Trending Articles on Technical and Non Technical topics](/images/trending_categories.jpeg)
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
Physics
Chemistry
Biology
Mathematics
English
Economics
Psychology
Social Studies
Fashion Studies
Legal Studies
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
TypedArray.BYTES_PER_ELEMENT property in JavaScript
The BYTES_PER_ELEMENT property of the Typed Array represents the number of bytes in each element in it.
Syntax
Its Syntax is as follows
Float32Array.BYTES_PER_ELEMENT;
Example
<html> <head> <title>JavaScript Example</title> </head> <body> <script type="text/javascript"> var sizeOfFloat64Array = Float32Array.BYTES_PER_ELEMENT; document.write("Size of the float 32 array: "+sizeOfFloat64Array); document.write("<br>"); var sizeOfInt16Array = Int16Array.BYTES_PER_ELEMENT; document.write("Size of the int 16 array: "+sizeOfInt16Array); </script> </body> </html>
Output
Size of the float 32 array: 4 Size of the int 16 array: 2
Advertisements