- 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.keys() function in JavaScript
The keys() function of typedArray object is similar to entries but, it returns an iterator object containing the indices of the typed array.
Syntax
Its Syntax is as follows
typedArray.keys()
Example
<html> <head> <title>JavaScript Array every Method</title> </head> <body> <script type="text/javascript"> var int32View = new Int32Array([21, 64, 89, 65, 33, 66, 87, 55]); document.write("Contents of the typed array: "+int32View); document.write("<br>"); var it = int32View.keys(); for(i=0; i<int32View.length; i++) { document.writeln(it.next().value); } </script> </body> </html>
Output
Contents of the typed array: 21,64,89,65,33,66,87,55 0 1 2 3 4 5 6 7
Advertisements