Object.prototype.hasOwnProperty() - JavaScript | MDN - MDN …
https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty
WEBJan 15, 2024 · The hasOwnProperty() method returns true if the specified property is a direct property of the object — even if the value is null or undefined. The method returns false if the property is inherited, or has not been declared at all. Unlike the in operator, this method does not check for the specified property in the object's prototype chain.
DA: 68 PA: 56 MOZ Rank: 1