我对此深感困惑;
(function(win) {
const Thing = function(imADiv) {
this.test = imADiv;
};
Thing.prototype = {
self: this
};
win.Thing = Thing;
})(window);
const thingy = new Thing(document.getElementById('test'));
console.log(thingy.self());
在这种情况下,this
为什么为了上帝的爱而返回窗口对象?