function Contador () {
this.num = 0;
var obj = this;
this.timer = setInterval (function add () {
obj.num++;
console.log (obj.num);
}, 1000);
}
var b = new Contador();
I can not understand right how to use these functions, in this code I did, is there any way to reference this
to Counter without assigning to a variable?
If anyone knows of a good place to learn more about using this
and these functions, I'm grateful!