keys :: Object |
Note that the order of the resulting Array is browser-dependent (it relies on the for...in loop), and is therefore not guaranteed to follow either declaration or lexicographical order. Sort the array if you wish to guarantee order.
Examples
Object.keys() // -> []
Object.keys({ name: 'Prototype', version: 1.5 }).sort() // -> ['name', 'version']
|
Prototype API 1.5.0 - prototypejs.org