var obj = {};
Object.defineProperty(this, 'foo', void (obj.value = 0) || obj);
Object.defineProperty(this, 'foo2', void (obj.value = 1) || obj);
对比
Object.defineProperty(this, 'foo', {value:0});
Object.defineProperty(this, 'foo2', {value:1});
两者似乎都运行得一样快,但前者对 gc 会更好吗?