In JavaScript we have a few ways of getting the properties of an object, depending on what we want to get.
1) Object.keys(), which returns all own, enumerable properties of an object, an ECMA5 method.
2) a for...in loop, which returns all the enumerable properties of an object, regardless of whether they are own properties, or inherited from the prototype chain.
3) Object.getOwnPropertyNames(obj) which returns all own properties of an object, enumerable or not.
We also have such methods as hasOwnProperty(prop) lets us check if a property is inherited or actually belongs to that object, and propertyIsEnumerable(prop) which, as the name suggests, lets us check if a property is enumerable.
With all these options, there is no way to get a non-enumerable, non-own property of an object, which is what I want to do. Is there any way to do this? In other words, can I somehow get a list of the inherited non-enumerable properties?
Thank you.