JavaScript Object.create() with Object.hasOwn()
const obj = Object.create(null);
obj.propA = 'Value';
obj.propB = false;
console.log('propA:', Object.hasOwn(obj, 'propA')); // "propA: true"
console.log('propC:', Object.hasOwn(obj, 'propC')); // "propA: false"
no comments