I have a class like:
function run(){
this.interval;
this.start = function(){
this.interval = setInterval('this.draw()',1000);
};
this.draw = function(){
//some code
};} var run = new run(); run.start();
however I can't seem to reference/call this.draw()
within the setInterval, it says this.draw()
is not a function, and if I remove the quotes it says useless setInterval call, what am I doing wrong?