What else can I use instead of arguments.callee?
<pre><code>function runProcess(){
     var todo = items.concat();
     setTimeout(function(){
        process(todo.shift());
        if(todo.length &gt; 0){
           setTimeout(arguments.callee, 25);
        } else {
           callback(items);
        }
     }, 25);
}
</code></pre>

<p>I tried to refactor this block into a function</p>

<pre><code>function doWork(todo){
        process(todo.shift());
        if(todo.length &gt; 0){
           setTimeout(arguments.callee, 25);
        } else {
           callback(items);
        }
     }
</code></pre>

<p>But this time given array repeats itself from the start</p>

<p>I think the problem occurs in <strong>arguments.callee</strong>,so what can i use instead of it?
<br />
Best Regards</p>
