Object.hasOwnbeginner// Check if a property is directly on the object
const obj = { name: 'Alice' }
Object.hasOwn(obj, 'name') // β true
Object.hasOwn(obj, 'toString') // β falseUse Object.hasOwn() to reliably check if a property is an own property, without being fooled by inherited properties.
Object.hasOwn returns false for properties that do not exist on the object at all.
Challenge: Implement isMissing(obj, key) that returns true when the property does NOT exist as an own property.
isMissing({ a: 1 }, 'b') // β true
isMissing({ a: 1 }, 'a') // β false