How to pass variable from one Javascript to another Javascript file
<p>I tried the following, trying to pass a variable from one JavaScript file to another JavaScript variable. My first JavaScript file:</p>

<pre><code>var x = "sachin";
</code></pre>

<p>My other JavaScript file can't access that <code>x</code> variable value. How do I solve this? I can access that <code>x</code> variable and same value in another file.</p>