JSFiddle - React, Tailwind, and code Playground
JavaScript
function Konst(){
this.color = 'red';
function func(){
alert (this.color);
};
this.funcTimeout = function(){
setTimeout( function() { func.call(this)}, 2000 ); // так же теряется this. Почему в "func.call(this)" - в this не пишется j?
};
};
var j = new Konst();
j.funcTimeout();