Hint
hasOwnProperty = own only. in = entire chain. Use hasOwnProperty to distinguish instance vs inherited.
function Animal(name) { this.name = name; }
Animal.prototype.speak = function() { return this.name; };
const dog = new Animal('Rex');
console.log(dog.hasOwnProperty('name'));
console.log(dog.hasOwnProperty('speak'));
console.log('speak' in dog);true false true
Explanation: name is own. speak is on the prototype — hasOwnProperty is false. in checks the whole chain — true.
Key Insight: hasOwnProperty = own only. in = entire chain. Use hasOwnProperty to distinguish instance vs inherited.