what is wrong with my code? it should output 0-9 but it failed to do so. I think the error is in go()
<p>Can you help me debug this code? I can't see the errors in it. There is also no ouput to determine the error.</p>

<blockquote>
<pre><code> function go()
{
    var procedures = [];

    for (var i = 0; i &lt; 10; i++) 
    {
        procedures[procedures.length] = function () 
        {
            alert("You are now " + i + " years old");
        } 
        run_procs(procedures);
    }

    function run_procs(procs) 
    {
        for (var i = 0; i &lt; procs.length; i++)
        {
            procs[i]();
        }
    }

    go();
}
</code></pre>
</blockquote>
