Jsref Keys
# JavaScript keys() Method
[ JavaScript Array Object](#)
## Example
Create an array iterator object from the array fruit, which contains the keys of the array:
var fruits = ["Banana", "Orange", "Apple", "Mango"]; fruits.keys();
[Try it Yourself Β»](#)
* * *
## Definition and Usage
The keys() method is used to create an iterable object from an array that contains the array's keys.
Returns true if the object is an array, otherwise returns false.
* * *
## Browser Support
The numbers in the table specify the first browser version that fully supports the method.
| Method | | | | | |
| --- | --- | --- | --- | --- | --- |
| keys() | 38.0 | 12.0 | 28.0 | 8 | 25.0 |
* * *
## Syntax
array.keys()
## Parameters
No parameters.
## Technical Details
| Return Value: | An array iterable object. |
| --- |
| JavaScript Version: | ECMAScript 6 |
* * JavaScript Array Object](#)
YouTip