ObjecthasOwno
Object.hasOwn is a static method of the Object object in JavaScript that determines whether an object has a given property as its own property, not inherited from its prototype chain. It was introduced in ECMAScript 2022.
The syntax for Object.hasOwn is Object.hasOwn(obj, prop). It takes two arguments: obj, the object to check, and
This method is a more robust and reliable alternative to Object.prototype.hasOwnProperty. Unlike hasOwnProperty, Object.hasOwn can be
Object.hasOwn is useful in scenarios where you need to explicitly check for properties directly defined on