key( index ) method

Storage

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.

Type:

string

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 97.