You need to change the context of the function argument for setTimeout
to the current instance:
setTimeout(function () {
this.setValue(10*this.i);
this.i++;
if (this.i < 11) {
alert(this.i);
this.delayedLoop();
}
}.bind(this), 300);