propertyIsEnumerableintermediate// Check if a property shows up in for...in loops
const obj = { a: 1 }
obj.propertyIsEnumerable('a') // β true
Object.defineProperty(obj, 'b', { value: 2, enumerable: false })
obj.propertyIsEnumerable('b') // β falseUse propertyIsEnumerable() to check whether a specific own property will appear during enumeration (e.g., for...in or Object.keys).
propertyIsEnumerable() always returns false for inherited properties, even if they are enumerable on the prototype.
Challenge: Show that inherited properties return false even when enumerable on the prototype.