There are two methods, Object.getOwnPropertyNames () and Object.keys ()
The first: Object.getOwnPropertyNames (obj) itself only acquired the properties defined parameter object, regardless of whether the property can be traversed.
Object.getOwnPropertyNames(Array); // ["length", "name", "prototype", "isArray", "from", "of"]
The second: Object.keys () itself only acquired the properties defined parameter object, but will only get to traverse the properties.
Object.keys(Array); // []