DEV Community

Discussion on: JavaScript Class Improvements

Collapse
 
tunna29 profile image
tunna29

helpful to me
but i have some problems

i dont understand this : var A = function A() {
var _this = this;
this.x = 10;
this.m = function () {
return console.log(_this.x);
};
};

we have a variable named A , so why do we need the name A for the function