The in operator returns if a property is in an object’s own properties OR its prototype chains properties

const protoForBar = { a: 123 };
const bar = Object.create(protoForBar); // "protoForBar" will be the prototype of "bar"
bar.b = 0;

console.log('a' in bar); // true
console.log('b' in bar); // true
console.log('toString' in bar); // true
console.log('z' in bar); // false