Object.getOwnPropertyNamesintermediate// 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().
Arrays have a non-enumerable length property. Object.getOwnPropertyNames includes it, while Object.keys does not.
Challenge: Implement namesIncludeLength(arr) that returns whether Object.getOwnPropertyNames of arr includes 'length'.
namesIncludeLength([1, 2, 3]) // β true