The Object.hasOwn() static method returns true if the specified object has the indicated property as its own property. If the property is inherited, or does not exist, the method returns false.
Note: Object.hasOwn() is intended as a replacement for Object.prototype.hasOwnProperty().