Skip to content

Latest commit

 

History

History
48 lines (41 loc) · 990 Bytes

File metadata and controls

48 lines (41 loc) · 990 Bytes
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
devlang-javascript
language-reference
JavaScript
TypeScript
DHTML
fc5b6a30-642c-4bd7-ad31-a42667af2f3f
4
mikejo5000
mikejo
ghogen

keys Method (Array) (JavaScript)

Returns an iterator that returns the index values of the array.

Syntax

arrayObj.keys();  

Parameters

arrayObj
Required. The array object.

Remarks

Example

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   

Requirements

[!INCLUDEjsv12]