(Sorry, another this question in javascript.)
I have the code below, and I’m wondering what ‘this’ represents in the call at the end– the Window or the 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);
Well, assuming there is no parent scope, it is
windowEDIT: See example: http://jsfiddle.net/Umseu/1