What output results when using defineProperty with default flags?
const obj = {};
Object.defineProperty(obj, 'prop', { value: 42 });
obj.prop = 100;
console.log(obj.prop);
for (let key in obj) console.log(key);
The output will be 42 and nothing from the loop because: 1) When using Object.defineProperty() without specifying flags, all flags default to false, 2) Therefore, the property is non-writable, so the assignment obj.prop = 100 is ignored, 3) The property is non-enumerable, so it doesn't appear in the for...in loop, 4) The property still exists and has value 42, so that's what's logged, 5) This behavior is often a source of confusion for developers new to property descriptors, 6) It's the opposite of the default behavior when creating properties through direct assignment.