This is pretty cool, but something about the notation confused me. Say we have an object called "foo":
var foo = {};
Is it really necessary to define properties on it with this notation? Object.defineProperty(foo, 'bar', { value: 'baz' });
Since foo itself is an Object, wouldn't it also have this method? Why can't I define a property on foo like this? foo.defineProperty('bar', { value: 'baz' });