🔍 Quick look before the question:
function Counter() {
this.count = 0;
this.increment = function() {
this.count++;
};
}
const c = new Counter();
const inc = c.increment;
inc();
console.log(c.count);
function Counter() {
this.count = 0;
this.increment = function() {
this.count++;
};
}
const c = new Counter();
const inc = c.increment;
inc();
console.log(c.count);