Good. I have a problem in JavaScript. I created a function constructor and added properties and methods that one method has when it is called to work with methods of the object environment as a basic example, since my constructor is too complex.
function Construct(){ this.alert = 'test1'; this.replace = ''; this.interval; this.run = function(){ console.log(this);
This fails if you read the code, which you must understand why.
how can I pass a constructor object (this) to a function of a given interval?
I tried to use external functions and pass this as arguments, but it fails, because the replacement is still what it is, and these are the runes only once why?
Please, help.
Thanks.
source share