| title | ms.custom | ms.date | ms.prod | ms.reviewer | ms.suite | ms.technology | ms.tgt_pltfrm | ms.topic | dev_langs | ms.assetid | caps.latest.revision | author | ms.author | manager | ||||
|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
keys Method (Array) (JavaScript) | Microsoft Docs |
01/18/2017 |
windows-client-threshold |
|
language-reference |
|
fc5b6a30-642c-4bd7-ad31-a42667af2f3f |
4 |
mikejo5000 |
mikejo |
ghogen |
Returns an iterator that returns the index values of the array.
arrayObj.keys();
arrayObj
Required. The array object.
The following example shows how to get the key values of an array.
var k = ["a", "b", "c"].keys();
// k.next().value == 0
// k.next().value == 1
// k.next().value == 2 [!INCLUDEjsv12]