Array.keys

keys — Returns an ArrayIterator with the keys of the array.

Description

Array.keys()

Changelog

Version Description
ES 6 Introduced.

Examples

Example #1 – keys example
var array = [2, 4, 8]; var keys = array.keys(); console.log(typeof keys); // object console.log(keys); // ArrayIterator {}

External references