key( index ) method

Returns the key at the supplied index.

Keys are guaranteed to remain at the same index until a modification is made.

Syntax

key( index ) → {String}

Parameters

Name Type Description
index Integer 0-based index to the key.Must be less than the value retrieved by .length.

Returns

The key, or null if the index is invalid.

[/reference/refbody/section/sectiondiv {""})

Type:

String

(sectiondiv]

Example

// Create the SUP Storage
var store = new hwc.SUPStorage ("one");
store.setItem ("foo", "bar"); // add an item.
var result = store.key (0); // will returns "foo".

Source

SUPStorage.js, line 96.