Object.hasOwn() is intended as a replacement for Object.hasOwnProperty() Object.prototype.hasOwnProperty() - JavaScript | MDNThe following example shows how to iterate over the properties of an object without executing on inherit properties. Note that the loop is already only iterating enumerable items, so one should not assume based on the lack of non-enumerable properties shown in the loop that hasOwnProperty itself is confined strictly to enumerable items (as with Object.getOwnPropertyNames() ).https://developer.mozilla.org/ko/docs/Web/JavaScript/Reference/Global_Objects/Object/hasOwnProperty