Exploring and experimenting to unravel the workings of this feature, but I find myself puzzled by this particular scenario.
Object.defineProperty(Object.prototype, 'a', {set: function() {console.log("Set!");} });
Based on my understanding, whenever I create an object named "a," that function should be triggered. It seems to work when done like this:
a = {};
Set!
However, it doesn't behave the same when nested within another object:
test = {a:{}};
Could there be something I'm misinterpreting?