English | 简体中文 | 繁體中文 | Русский язык | Français | Español | Português | Deutsch | 日本語 | 한국어 | Italiano | بالعربية
The JavaScript array keys() method returns a new array iterator object that contains the keys of each index in the array.
array.keys()
var alpha = ['A', 'B', 'C', 'D', 'E']; var iterator = alpha.keys();Test See‹/›
The numbers in the table specify the first browser version that fully supports the keys() method:
Method | |||||
keys() | 38 | 28 | 25 | 8 | 12 |
Return Value: | A new array iterator object |
---|---|
JavaScript Version: | ECMAScript 6 |