(Sorry, another thisjavascript question .)
I have the code below and I wonder what 'this' represents in the call at the end - Window or Bird?
var Bird = (function () {
Bird.name = 'Bird';
function Bird(name) {
this.name = name;
}
Bird.prototype.move = function (feet) {
return alert(this.name + (" flew" + feet + "ft."));
};
return Bird;
}).call(this);
source
share