let's assume that I have a class written in TypeScript like this:
class Messenger {
x = 10;
constructor(){
this.y = 20;
}
};
the JavaScript version of this will look like:
var Messenger = (function () {
function Messenger() {
this.x = 10;
this.y = 20;
}
return Messenger;
}());
;
The x and y variables are compiled to the same thing in JavaScript so what is the difference here?
Thanks.