Arguments as global variables in javascript
<p>I want to use a global variable for using as argument for two or more functions:</p>

<pre><code>$(document).ready(function(){
     function foo(x){
        var z = '#'+ x ;
        // use function bar(y,z) insde;
     }
     function bar(y,z){
       //
     }

    });
</code></pre>

<p>In practice, bar function cant see the z argument. Is there any way to define "z" as a global variable?</p>

<p>Thanks</p>
