title: Call javascript var inside other script
body: <p>I have this code:</p>
  
  <p><div class="snippet" data-lang="js" data-hide="false">
  <div class="snippet-code">
  <pre class="snippet-code-js lang-js prettyprint-override"><code>&lt;script type="text/javascript"&gt;
  var rndn = Math.round(Math.random()*1000000);
  &lt;/script&gt;
  &lt;script type="text/javascript" src="http://myexample.com/call=cid&amp;rnd=7676786"&gt;&lt;/script&gt;</code></pre>
  </div>
  </div>
  </p>
  
  <p>I need to recall the "rndn" var to replace the number <strong>7676786</strong> in the second script.</p>
  
  <p>How do I do that?</p>