Where is a bug?
Solutions
var A = function () {
this.name = "Vladimir";
}
A.prototype.alert = function () { alert(this.name) };
var a = new A();
a.alert();
var A = () => {
this.name = "Vladimir";
}
A.prototype.alert = function () { alert(this.name) };
var a = new A();
a.alert();
var A = () => {
this.name = "Vladimir";
}
var a = new A();
a.alert();