May 2011
Intermediate to advanced
1096 pages
40h 54m
English
Object.getOwnPropertyNames() — return the names of non-inherited properties
ECMAScript 5
Object.getOwnPropertyNames(o)
oAn object
An array that contains the names of all non-inherited
properties of o, including
non-enumerable properties.
Object.getOwnPropertyNames() returns an
array that contains the names of all non-inherited properties of
o, including non-enumerable properties.
See Object.keys() for a function
that returns only the names of enumerable properties.
Note that this is not a method to be invoked on an object: it is a global function and you must pass an object to it.
Object.getOwnPropertyNames([])// => ["length"]: "length" is non-enumerable
Read now
Unlock full access