keys

keys() -> [String...]

Provides an Array of keys (that is, property names) for the hash.

Note: the order of key names is browser-dependent (based on the forin loop). Also, this currently skips any property whose value is a function (such as hash methods).

Examples


$H({ name: 'Prototype', version: 1.5 }).keys().sort()
// -> ['name', 'version']

$H().keys()
// -> []