prototype内でのsetTimeoutの呼び出し
prototype内でsetTimeoutなどの非同期処理を使ってthisを呼び出す場合、
通常のthisが重複する処理同様、いったん別変数に移し替えてから行う。
function aaa(){ this.cnt = 1; } aaa.prototype.bbb = function(){ this.cnt++; var self = this; setTimeout(function(){ self.bbb(); },this.speed); }