Object.getOwnPropertyNamesbeginner// Get all own property names, including non-enumerable
const obj = { a: 1 }
Object.defineProperty(obj, 'hidden', { value: 2, enumerable: false })
Object.getOwnPropertyNames(obj) // β ['a', 'hidden']Use Object.getOwnPropertyNames() to list all own properties including non-enumerable ones, unlike Object.keys().
Calling Object.getOwnPropertyNames on {} returns an empty array because there are no own properties.
Challenge: Implement isEmptyObject(obj) that returns true if Object.getOwnPropertyNames(obj) has length 0.
isEmptyObject({}) // β true
isEmptyObject({ a: 1 }) // β false