How to define Global Arrays?
<p>Code example:</p>

<pre><code> &lt;script&gt;
      var data = new Array();
      data[0] = 'hi';
      data[1] = 'bye';
 &lt;/script&gt;

 &lt;script&gt;
      alert(data[0]);
 &lt;/script&gt;
</code></pre>

<p>This gives the following error: <code>data is not defined</code></p>

<p>How do you make something like this work? Especially if the first <code>&lt;script&gt;</code> block is being loaded on the page by ajax, and the second block is working from it.  jQuery solution is acceptable.</p>
