The Object hasOwn() static method returns true if the object has the indicated property as its own property. If the property is inherited or does not exist, it returns false.
const account = {
amount: 100
}
const accountObjHasOwnAmount = Object.hasOwn(account, 'amount');
console.log(accountObjHasOwnAmount);
// true
console.log(Object.hasOwn(account, 'toString'));
// false