Object.getOwnPropertyNames() method returns an array of all properties (including non-enumerable properties except for those which use Symbol) found directly in a given object.
syntax ↴
Object.getOwnPropertyNames(obj) ↴
obj The object whose enumerable and non-enumerable properties are to be returned.
Object.getOwnPropertyNames() method returns an array of strings that corresponds to the properties found directly in the given object.
Object.getOwnPropertyNames() method does not change the original object.
Object.getOwnPropertyNames(myObject)