Javascript keeps undefining my vars, it's harshing my buzz. Help?
<p>This is my first experience with javascript, and... Well... Ugh. Here's what's happening:</p>

<pre><code>function step_1(id) {
    //blah blah
    step_2(id);
}
function step_2(id) {
    //blah blah
    step_3(id);
}
function step_3(id) {
    //blah blah
    alert(id);
}

step_1(0); // I can stick any number here, same thing happens...
</code></pre>

<p>The alert pops up and says "Undefined". But, if I throw an alert(id); in step_2, then both alerts say "0".</p>

<p>Why/how is id undefined? What am I doing wrong?</p>

<p>I've even tried reassigning id in each function, like:</p>

<pre><code>var nid = id;
step_2(nid);
</code></pre>

<p>etc... But that still doesn't work without the alerts.</p>

<p>EDIT: Since my example apparently works fine, perhaps it would help to <a href="http://pastebin.com/78W0pVCK" rel="nofollow">look at the blah blah that's going on in my code</a>. It works fine, unless I take out the alert(id); on line 11.</p>
